Electrolysis of water using 240V AC
What you are trying to do is called a redox reaction (from REDuction-OXydation) in which one molecule will be oxidized (i.e. give one electron) and another will be reduced (i.e. receive one electron). The propensity of two different molecules to exchange electrons is called "redox potential" and measured in Volts.

In the case of water, its dissociation into hydrogen and oxygen has a potential of 1.23V(1), so a 1.5V battery would be enough (however a rechargeable battery usually has a potential of 1.2V which would not be enough).

In your case, you apply a 240V potential, which will not only promote many other reactions but also heat the water up because of the Joule effect and make it boil.

(1) I purposely ignored the sign not to confuse you.