Electrolysis in aqueous solution – which equations to use to predict product at each electrode? When trying to work out what will be produced at each electrode during electrolysis, I'm confused as to which equations to use for hydrogen and oxygen.

For instance, an electrolytic cell containing aqueous nickel(II) bromide, with a nickel cathode and a platinum anode.

At the cathode:

$$\ce{Ni^2+ + 2e- -&gt; Ni}$$

I have read that this does not occur because $\ce{Ni^2+}$ is a worse oxidising agent than $\ce{H+}$, which makes sense because $\ce{H+}$ is lower down on the left side of the electrochemical series meaning its reduction is more feasible.

Water is therefore reduced at the cathode:

$$\ce{2H+ + 2e- -&gt; H2}\quad E^\circ=0.0\ \mathrm V$$

or:

$$\ce{2H2O + 2e- -&gt; H2 + 2OH-}\quad E^\circ=-0.83\ \mathrm V$$

The second equation, however, has water higher up in the electrochemical series. This would suggest nickel should actually  be reduced in preference to water.

How do I know which of the two "water-reduction" equations to use?

This is even less transparent for the anode, where bromide should be oxidised to bromine, but there are also two equations showing production of oxygen: one below and one above bromide in the series:

$$\begin{alignat}{2}
\ce{O2 + 4H+ + 4e- &amp;-&gt; 2H2O}\quad &amp;E^\circ&amp;=+1.23\ \mathrm V\\[6pt]
\ce{O2 + 2H2O + 4e- &amp;-&gt; 4OH-}\quad &amp;E^\circ&amp;=+0.40\ \mathrm V
\end{alignat}$$

I don't understand which of these equations should be used and how you're supposed to know which to use.
The given potentials $E = 0.00{\text{ V}}$ and $E = -0.83{\text{ V}}$ for the reduction of water apply to different $\text{pH}$.

The thermodynamic relation of the potential $E$ to the composition of the solution is generally known as the Nernst equation:

$$E = E^\circ  + \frac{{0.059{\text{ V}}}}{z}\log \frac{{{{\prod\nolimits_i {\left[ {{\text{ox}}} \right]} }^{{n_i}}}}}{{{{\prod\nolimits_j {\left[ {{\text{red}}} \right]} }^{{n_j}}}}}$$

For the given reaction

$$\ce{2 H+ + 2e- &lt;=&gt; H2}$$

the Nernst equation reads

$$E = 0.00{\text{ V}} + \frac{{0.059{\text{ V}}}}{2}\log \frac{{{{\left[ {{{\text{H}}^ + }} \right]}^2}}}{{\left[{{{\text{H}}_2}}\right]}}$$

Since

$${\text{pH}} =  - \log \left[ {{{\text{H}}^ + }} \right]$$

the potential $E$ depends on $\text{pH}$:

$$E = 0.00{\text{ V}} - 0.059{\text{ V}} \times {\text{pH}} + \frac{{0.059{\text{ V}}}}{2}\log \frac{1}{{\left[ {{{\text{H}}_2}} \right]}}$$

Therefore, the potential is $E = 0.00{\text{ V}}$ at $\text{pH} = 0$ and $E = -0.83{\text{ V}}$ at $\text{pH} = 14$ respectively.