Water is abundant throughout the entire universe. What water has going for it is that its constituents, hydrogen and oxygen, are also ridiculously common, and those two elements really enjoy bonding with each other. Oxygen has two open slots in its outmost electron orbital shell, making it very eager to find new friends, and each hydrogen comes with one spare electron, so the triple-bonding is a cinch.
Hydrogen comes to us from the Big Bang itself, making it by both mass and number the #1 element in the cosmos. Seriously, the stuff is everywhere. About 75% of every star, every interstellar gas cloud, and every wandering bit of intergalactic space debris never to know the warmth of stellar fusion in 13.8 billion years of cosmic history is made of hydrogen. That hydrogen got its start when our universe was only about ten minutes old, and all the hydrogen that has ever existed (except for random radioactive decays and fission reactions, but that would come later) formed before our universe turned 20 minutes.
A dozen minutes, 13.8 billion years ago. When you quench your thirst with a healthy glass, that's what you're consuming.
We can understand this epoch of cosmic history, known as the nucleosynthesis era, because over the past century we've become rather skilled at dealing with nuclear reactions, and in one of the hallmarks of our species we have unleashed this radical understanding into the physical nature of reality and deployed it for both peacetime energy generation and wartime bombs.
Our understanding of nuclear physics tells us that earlier than the ten-minute mark, our universe was too hot and too dense for protons and neutrons to form. Instead their subatomic parts, known as quarks, were unglued in a heaving maelstrom of nuclear forces, constantly binding and unbinding in a seething rage-filled sea of gluons, the force carriers of the strong nuclear force.
Climate change and South Africa’s water woes — an urgent call to community action
Once the universe expanded and cooled enough, condensates of protons and neutrons formed like droplets on the windowpane, low-energy pockets capable of keeping themselves together despite the temperatures. Eventually, however, as soon as the party got going it fizzled out: when the universe became too large and too cool, a mere dozen minutes later, there wasn't sufficient density to bring the quarks close enough together to perform their nuclear binding trick. Some protons and neutrons would find each other in those storm-filled days, though, forming heavier versions of hydrogen, some helium, and a small amount of lithium.
And since then those hydrogen atoms have wandered about the cosmos; most lost in the intergalactic wastes, some participating in the glorious construction of stars and planets, and a lucky few finding themselves locked in a chemical dance with oxygen.
The oxygen has another tale to tell, also a story of fusion, on its way to becoming water. But not the fusion of the first few heady minutes of the Big Bang, but in the dance within the hearts of stars. There, crushing pressures and violent temperatures slam hydrogen atoms together, forcing them to fuse into helium, in the process releasing an almost vanishingly small amount of energy. But that forced marriage happens millions of times every second, in every one of the trillions upon untold trillions of stars strewn about the cosmos, enough to light up the universe for all conscious observers to enjoy.
Near the end of a star's life, it turns to fusing the built-up ash of helium piled in its core, The fusion of helium produces two products: carbon and oxygen. Now this oxygen would end up forever closed off from the cosmos, locked behind a million-kilometer thick wall of plasma, if it were not for a trick of physics that happens when the star meets its final days.
Our sun will someday experience this fate, about four and a half billion years now. When it grows old and weary, it will swell and turn red, violently spasming as it draws its last fatal breaths. Those gargantuan shudders release material from the star, launching it into the surrounding system, billowed by gusty winds of fundamental particles streaming away at nearly the speed of light. Fit by ragged fit, the sun will lose its own self, driving away over half its mass into a spreading nebula, the only sign that distant eyes can perceive of yet another noble star laying down its struggle against the all-consuming night.
But in that gruesome death, a miracle. The cycle born anew: the hydrogen and helium, the primordial elements of the star, now mixed with carbon and oxygen drift off into the interstellar void, someday to take part in the formation of a new star, a new solar system, a new world wet with water, and, if the chances are perfect, a new life.