Chemistry - In electrolysis, why does each atom wait to turn into gas until they reach a particular electrode?
Solution 1:
$\ce{H2O}$ is not simply split apart by electricity, as you say. No ! What happens on one electrode is not related to what happens to the second electrode. Let's start by discussing what is happening on the negative electrode, the cathode.
The negative electrode behaves as if it contains plenty of electrons ready to react with anything able to do it. It could be positive ions. But in neutral solutions it may be water that does react with these electrons, according to : $$\ce{2 H2O + 2 e^- -> H2 + 2 OH-}$$ So, some bubbles of gaseous Hydrogen $\ce{H2}$ are produced on the cathode and the solution become basic because of the appearance of $\ce{OH-}$ ions in solution.
On the other electrode, the anode, which is the positive electrode, something must occur to produce electrons. Once again, it is water that manages to be decomposed in order to produce electrons. It is done this way : $$\ce{ 2 H2O -> 4 H+ + O2 + 4 e-}$$ Here some oxygen bubbles are produced on the anode. And the solution becomes acidic, if it was neutral in the beginning.
A last consequence of these chemical transformations is the fact that the solution becomes acidic at the anode and basic at the cathode. Of course, by simple mixing the $\ce{H+}$ and the $\ce{OH-}$ ions neutralize one another, producing water. So the only visible effect of the electrolysis is the production of $\ce{H2}$ at the cathode and $\ce{O2}$ at the anode, as if $\ce{H2O}$ has been split. Only "as if".
Solution 2:
In electrolysis, why does oxygen only appear on the anode?
Easy way to remember this is that oxidation occurs at the anode (both start with vowels), and oxidation implies a loss of hydrogen. If we lose hydrogen from water, we are left with oxygen.
If you wish to understand it crudely, the concept is that anode the surface in the solution where the electrons are being swept away by a "pump" (=read battery). Hence the anode needs electrons to balance the electrons, which were pump away by the battery towards the cathode. Recall a vacuum cleaner sucks air at one end and lets it out from another end. There is no creation or destruction of electrons.
Now depending on the voltage, the anode material can withdraw electrons from anything. Which is the most abundant material around the anode? The solvent. Hence, if we withdraw electrons from water, we get the overall reaction, which is written everywhere:
$\ce{ 2 H2O -> 4 H+ + O2 + 4 e-}$---- eq (1)
Now note that oxygen evolution reaction is still subject of interest to electrochemists. They wish to understand how does equation (1) proceeds at a molecular level. Lookup Wiki for Oxygen Evolution Reaction. The pictorial mechanism is
Solution 3:
Electron transfer between the 'species in the solution' and the 'electrode' take place at the surface of the electrode. So, considering water with some acid
Oxidation at anode: $\ce{2 H2O(l) -> O2(g) + 4 H+(aq) + 4e−} \quad E^\circ = \pu{+1.23 V}$ (for the reduction half-equation)
This oxidation (electron transfer from water to the electrode) occur at the electrode surface. So, $\ce{O2}$ gas should evolve at the surface of the electrode. Similar is the case of hydrogen, $\ce{H+}$ in the solution gets reduced to $\ce{H2}$ gas at the surface of the cathode.
https://en.wikipedia.org/wiki/Electrolysis_of_water
Solution 4:
Why does each atom wait to turn into gas until they reach a particular electrode?
There are no oxygen atoms or hydrogen atoms formed in the solution. There is also no "electricity" going through the solution. The processes happen at the electrodes because the cathode is able to provide electrons (to reduce hydrogen ions to dihydrogen) and the anode is able to take up electrons (to oxidize hydroxide ions to dioxygen, with the hydrogen turning into hydrogen ions).
If the electricity just breaks apart bonds wouldn’t the hydrogen and oxygen just immediately turn into gas and bubble up wherever they split apart?
In solution, water auto-dissociates into hydroxide and hydrogen ions. This process is not electrochemistry, and it is insufficient to form elemental hydrogen and oxygen.
The other answers nicely explain what actually happens.