The Prism

Something similar happens with the raindrops. Similar to the prism, light is refracted while passing through the boundary between the air and the water. Because different components of light are refracted differently again, the light is split into its spectral colours. Afterwards the light is reflected at the back of the raindrop.

Comparison of the Dispersion of Light at a Prism and at a Raindrop.

Light leaves a prism on the opposite side of the light source. In a raindrop, light leaves on the side it came in through due to the reflection.

Where do you have to stand in relation to the sun and the rain to see the colours of the light?