Why does a rainbow appear after rain?
A rainbow appears when sunlight passes through tiny water droplets suspended in the atmosphere, usually after or during rainfall. When sunlight enters a raindrop, it bends or refracts and separates into its different colors because each wavelength of light bends by a slightly different amount. The light is then reflected from the inside surface of the raindrop before bending again as it leaves the droplet. This process separates white sunlight into the familiar spectrum of colors, including red, orange, yellow, green, blue, indigo, and violet.
For a rainbow to be visible, the Sun must generally be behind the observer while rain or water droplets are in front of them. Millions of droplets can contribute to the rainbow, with each droplet sending particular colors of light toward the observer at specific angles. This is why a rainbow usually appears as a curved arc in the sky and why its position can change as the observer moves. Under suitable conditions, a complete circular rainbow can even be seen from an elevated position.