Here’s how rainbows are made.
Some 13.7 billion years ago, a mere millionth of a second after the Big Bang, the first hydrogen and helium nuclei condensed out of a hot, dense soup of quarks and gluons. It took another 380 000 years or so for conditions in the ancient Universe to settle down enough to allow the existence of atoms. About 400 million years later, some of this hydrogen and helium was incorporated into the first stars. Inside these great engines of creation, atoms fused into bigger atoms, steadily climbing up the periodic table. This first generation of stars lived short lives detonating as spectacular supernovae, spreading heavier elements around the early cosmos. Time passes and newer stars were born, incorporated into these later generations was debris created in the first stars.
Aeons later, our own Sun was born in a vast, cloud cloud of hydrogen, helium and sooty dust. As a mere afterthought our planet and its sisters congealed out of the left overs. All the stuff, the iron, silicon, carbon, oxygen and so on, making up the planets had been cooked up in successive generations of stars from primordial hydrogen and helium.
In the last 4.5 billion years our Sun has burned away more or less steadily as hydrogen atoms bash together building up into helium atoms deep below its surface. A trickle of photons, bits of light, is the by-product each time this happens and this trickle gradually (the journey time is thousands of years) meanders from the Sun’s core to its surface. Of course, the Sun is big and this happens about a hundred trillion trillion trillion times a second, so all these trickles of photons accumulates into a glorious blaze of light.
One day, some of this millennia-old light fell on the Earth, zooming though 150 million kilometres of empty space before plunging through the final tens of kilometres of mainly nitrogen and oxygen in our planet’s atmosphere. In the very last few kilometres some of the light was scattered by a myriad of water droplets (containing hydrogen nuclei which had existed almost since the Big Bang) slowly descending through the air following a rainshower. Finally some of the light was absorbed by atoms of silicon in the CCD chip at the back of a camera before a few more technological miracles recreated them on your screen.
What a wild, strange ride it takes to make a rainbow!