Sagot :
When sunlight hits a rain droplet, some of the light is reflected. The electromagnetic spectrum is made of light with many different wavelengths, and each is reflected at a different angle. Thus, spectrum is separated, producing a rainbow.
hope it help!
Rainbows are formed when light from the sun is scattered by water droplets (e.g. raindrops or fog) through a process called refraction. Refraction occurs when the light from the sun changes direction when passing through a medium denser than air, such as a raindrop. Once the refracted light enters the raindrop, it is reflected off the back and then refracted again as it exits and travels to our eyes.