Rainbow forms when sunlight hits the water drople.ts suspended in the atmosphere and undergoes total internal reflection. When the sunlight comes out of the drop it disperses, where the drop acts like a small prism.
This dispersion or breaking up of light into several colours form the Rainbow.
