Water molecules are very polarized and are pulled apart by the opposite charges in the equipment you illustrate. It is a DC current not a frequency phenomenon.
You can store energy in this fashion. The problem is that while you can combine hydrogen and oxygen in a flash, it takes considerable time to disassociate the molecules by electrolysis. The reaction is pretty efficient, just slow.
BTW, isn't the cathode negative?