Light & Observer moving perpendicular to each other

The way to do problems like this is always to use the Lorentz transformations. Choose some sensible spacetime points in the rest frame $S$ and use the transformations to see what those points look like in the moving frame $S'$. In this case this is what the points look like in $S$:

Image1

The spacetime points are labelled as $(t, x, y)$ - we'll ignore $z$ since we only need two dimensions for this problem. We choose our coordinates in the rest frame the light starts at $(0, 0, 0$), and after a time $t$ it's reached a distance $y = ct$ so this point is $(t, 0, ct)$.

Now our moving frame, $S'$, is moving along the $x$ axis at velocity $v$. As usual we'll choose the coordinates so the two frames coincide at time zero, so the point $(0, 0, 0)$ is the same in both frames. We just need to find where the other point is in $S'$. The Lorentz transformations tell us:

$$ t' = \gamma \left( t - \frac{vx}{c^2} \right ) $$

$$ x' = \gamma \left( x - vt \right) $$

$$ y' = y $$

So we substitute $t = t$, $x = 0$ and $y = ct$ and we get:

$$ t' = \gamma t $$

$$ x' = -\gamma vt $$

$$ y' = ct $$

So in the moving frame $S'$ the light ray looks like:

Image2

So in the moving frame the light is moving at an angle to the vertical, and the angle is given by:

$$ \theta = \tan^{-1} \frac{\gamma vt}{ct} $$

There are a few followup calculations that might be interesting to make. For example what happens to the angle $\theta$ as $v$ approaches $c$. Our equation above gives:

$$\begin{align} \theta &= \tan^{-1} \frac{\gamma ct}{ct} \\ &= \tan^{-1} \infty \\ &= \frac{\pi}{2} \end{align}$$

So go fast enough and the light ray appears to be moving directly away from you.

The other check is that the ray is still moving at the speed of light in the frame $S'$. In the $S'$ frame the velocity is:

$$ v' = \frac{\sqrt{x'^2 + y'^2}}{t'} $$

Putting in the values we've calculated for $t'$ etc we get (I'll square everything to simplify the algebra):

$$ \begin{align} v'^2 &= \frac{\gamma^2 v^2 t^2 + c^2 t^2}{\gamma^2 t^2} \\ &= v^2 + \frac{c^2}{\gamma^2} \\ &= v^2 + c^2 \left( 1 - \frac{v^2}{c^2} \right) \\ &= v^2 + c^2 - v^2 \\ &= c^2 \end{align}$$

So the speed of light still equals $c$, as it should.