Step 1: Set the scene.
An electromagnetic wave carries energy in both its electric field and its magnetic field. We compare the average energy stored per unit volume in each.
Step 2: Write the electric energy density.
The average energy density of the electric field is $U_E = \dfrac{1}{4}\epsilon_0 E_0^2$, where $E_0$ is the peak electric field.
Step 3: Write the magnetic energy density.
The average energy density of the magnetic field is $U_B = \dfrac{1}{4}\dfrac{B_0^2}{\mu_0}$, where $B_0$ is the peak magnetic field.
Step 4: Use the field relation.
In an EM wave the peak fields are tied together by $E_0 = c\,B_0$, where $c$ is the speed of light.
Step 5: Use the speed relation.
The speed of light obeys $c^2 = \dfrac{1}{\epsilon_0\mu_0}$. Substitute $E_0 = cB_0$ into $U_E$ and then replace $c^2$.
Step 6: Compare the two.
After substitution, $U_E$ turns out to be exactly equal to $U_B$. The energy is shared equally between the electric and magnetic fields. \[ \boxed{U_E = U_B} \]