Step 1: Recall the energy densities in an electromagnetic wave.
For an electromagnetic wave, the electric energy density is
\[
u_E=\frac{1}{2}\varepsilon_0 E^2
\]
and the magnetic energy density is
\[
u_B=\frac{1}{2\mu_0}B^2
\]
Step 2: Use the relation between electric and magnetic fields.
In free space,
\[
E=cB
\]
where \(c\) is the speed of light. Also,
\[
c^2=\frac{1}{\mu_0\varepsilon_0}
\]
Substituting \(E=cB\) into the electric energy density expression,
\[
u_E=\frac{1}{2}\varepsilon_0(cB)^2
\]
\[
u_E=\frac{1}{2}\varepsilon_0 c^2 B^2
\]
Using
\[
c^2=\frac{1}{\mu_0\varepsilon_0},
\]
we get
\[
u_E=\frac{1}{2\mu_0}B^2
\]
Thus,
\[
u_E=u_B
\]
Step 3: Compare the average energy densities.
Since the instantaneous electric and magnetic energy densities are equal, their average values are also equal.
Hence,
\[
K_E=K_B
\]
Step 4: Final conclusion.
Therefore, the correct relation is
\[
\boxed{K_E=K_B}
\]