What happens to iron electrodes (attached to a battery) in copper(II) sulphate solution?
The reaction is spontaneous, you don't need put a power supply.

Let's see the reaction with the potentials (obtained from the table of standard reduction potentials):

$$
\begin{align}
\ce{Fe^0 &amp;→ Fe^2+ + 2 e-} &amp;\quad E^\circ &amp;= \pu{0.44 V} \\
\ce{Cu^2+ + 2 e- &amp;→ Cu^0} &amp;\quad E^\circ &amp;= \pu{0.337 V} \\
\hline
\ce{Fe^0 + Cu^2+ &amp;→ Fe^2+ + Cu^0} &amp;\quad E^\circ &amp;= \pu{0.777 V}
\end{align}
$$

So, the solid formed in both electrodes is copper. The green solution is related to iron sulfate.