
When sun light splits due to water drops suspended in air, causing the band of seven colours is called rainbow.
Water droplets acts as tiny prism in the sky. The sunlight when enters these tiny droplets undergo internal reflection and also refract these rays which are dispersed causing a band of seven colours called rainbow.
Rainbow is always formed in the direction opposite to the sun.