This happens due to the relative nature of velocity. The relative velocity of rain with respect to car makes certain angle with vertical.
Let $\theta$ be the angle made by the relative velocity of rain with the vertical. Then,
\[\tan\theta=\frac{v_{\text{car}}}{v_{\text{rain}}}\]
Hence, rain drops hit the side windows of the car by making an angle $\theta$ with the vertical and leave diagonal streaks.
[Read: Motion in a Straight Line]