The relation you remembered is for R-L-C circuit where
for resistor: V_R=I R
for inductance: V_L= L\frac{dI}{dt}
for capacitor: V_C=\frac{1}{C}\int I dt

That is the reason why for AC signal I=I_0 sin\omega t,the voltage for inductance or capacitor are 90 degree out  of phase with current.

For electromagnetic wave, it is another sets of equations (it is also related to the above equations under some conditions)
\nabla\times\vec{E}=-\frac{\partial \vec{B}}{\partial t}
and
\nabla\times{B}=\mu_0 I + \mu_0\epsilon_0\frac{\partial \vec{E}}{\partial t}
For EM wave in free space, I=0
Combine the above two equations will give us
\nabla \vec{E}=\mu_0\epsilon_0\frac{\partial^2\vec{E}}{\partial t^2}
and
\nabla \vec{B}=\mu_0\epsilon_0\frac{\partial^2\vec{B}}{\partial t^2}
which are standard form for wave equation.
You can chek out http://en.wikipedia.org/wiki/Electromagnetic_wave for derivation

The wave can be represented with \vec{E}=\vec{E_0} sin (\vec{k}\cdot\vec{r}-\omega t)
The change on electric field (flux) will product magnetic field distribution (\nabla\times\vec{B})at near by space.
The time derivative will produce 90 degree phase differences.
However, the curl will also produce another 90 degree phase differences.
That is why the net effect is in phase. The electric field is in the same phase with magnetic field in free space.

It is possible to produce out of phase EM wave in wave guide.

You are welcomed to check out  [url=http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=35.0]Propagation of Electromagnetic Wave[/url]
:=)