We have often seen rainbow in the sky after it has rained. When the light coming from the sun passes through the tiny droplets of water in the air exactly after it has rained we are able to see rainbow in the sky. We know that the light coming from the sun consists of different colors like red, orange, yellow, green, blue, violet and when it passes through the water droplets scatter into these colors which form rainbow. This can be better understood by a simple experiment. Take a prism and let the white light pass through its one face now on the other side you will see a tiny rainbow. Same happens in the atmosphere after rain. The droplets act same as the prism for the light coming through sun. This scattering of light happens in the prism because of refractive index which means that when light enters from one medium to another, say from air to water it bends from its original path. Every wavelength bends differently causing dispersion and we see color spectrum.
An angle of 40 degrees is formed with the ray of light entering in the droplet and violet wavelength creates an angle of 42 degree with the red wavelength and the original ray of light entering in the drop.
Sometimes we see double rainbow this is because light again gets reflected within the drop. Drop should be of particular size to have two reflections.