Refraction of light is responsible for this.

This Is a Certified Answer

Certified answers contain reliable, trustworthy information vouched for by a hand-picked team of experts. Brainly has millions of high quality answers, all of them carefully moderated by our most trusted community members, but certified answers are the finest of the finest.
After the rain a number of small droplets of water remain suspended in the air. Each drop acts as a small prism. When sunlight falls on these drops the white light spills into seven colours. The dispersed light from a large number of drops forms a continuous band of seven colours. 
This coloured band is called a RAINBOW.
Thus this phenomena depends on Refraction and Dispersion of Light.