We know that Jupiter has an atmosphere made up mainly of hydrogen and helium. Europa,
a moon of Jupiter, has a very thin oxygen atmosphere, and HD 209458 b, a Jupiter-sized
exoplanet orbiting the star HD 209458 which is 154 lightyears away, has an atmosphere
that contains hydrogen, carbon, oxygen, sodium, carbon dioxide, methane, and even water vapor.
All this even though we haven’t visited any of these places to directly sample the
air... but we don’t need to.
We can study the air on other planets, moons, and exoplanets just by looking at them. In
particular, by looking at light that bounces off or passes through their atmospheres, because
when you shine light on a gas, the molecules absorb and scatter different frequencies of
that light in different amounts. If we then split the transmitted or scattered light apart
into its constituent colors using a prism or diffraction grating, we can see a molecule’s
light-absorption fingerprint, or its light-emission fingerprint. This is hydrogen. This is nitrogen.
Oxygen. Methane. Carbon dioxide. Water. Sulfuric acid.
So when we look at the sunlight bouncing off of the atmospheres of planets and notice spikes
of certain heights in certain frequencies, we can carefully match those to the known
fingerprints of gas molecules, and learn not just what gases make up the air, but even
their relative abundances!
In fact, we don’t even need to be able to see a planet at all to learn about its atmosphere
– many exoplanets have been discovered because they pass in front of their parent
star, which we see as a dip in the overall intensity of the star’s light. But if an
exoplanet has an atmosphere, the gas molecules in its atmosphere will block some frequencies
an extra amount, according to their molecular fingerprints, and we can do the same gas-matching
process as before. And that’s how we know what’s in the atmosphere of HD 209458 b!.
Of course, in practice it’s pretty darn challenging to use molecular fingerprints
to study exoplanet atmospheres, because air is thin so the fingerprints are super faint
and we need big sensitive telescopes and spectrometers; and because atmospheres are complicated and
their fingerprints can be ambiguous or hard to match; and because different parts of a
single star emit different amounts of different colors of light, so a planet’s effect on
the star’s spectrum will depend on which part the planet passes in front of.
But all of these difficulties can be dealt with by clever astronomers, and thus we have
been able to figure out what the air is like on planets hundreds of light years away that
we can’t even see.