How is a rainbow formed? Rainbow is formed only when the rays of light emanating from the Sun fall on the water droplets present in the atmosphere. When light passes through the droplets, it bends 42 degrees and splits into seven colors: violet, blue, indigo, green, yellow, orange and red. This is how rainbows are formed. Photo: Unsplash