The light from the sun is really a mixture of many different colors or wavelengths of light.The wavelength is simply the distance in which a wave repeats itself. Red light has a long wavelength, while violet light has a short wavelength. The light that we can see, or visible light, is actually made up of different wavelengths that we see as red, orange, yellow,green,blue,indigo,and violet light.
These colors gradually merge into one another, and the mixture produces white light. As white light passes through droplets of water in the sky, the light is refracted or bent. The longer wavelengths of light are refracted more than shorter wavelengths. This causes the colors to be separated as they pass through the raindrops. the result is the rainbow of seven colors that you see in the sky!