Spectroscopy! My favorite scientific advancement of all time: trying to figure out why substances make those patterns in a prism was what led to quantum physics, trying to explain why the patterns change frequencies in distant galaxies led to discovering the big bang, and in the meantime it’s just a very practical tool for measuring substances remotely based on light.
So yeah, if you pass the light from a star or planet through a prism (or diffraction grating these days) you get [a pattern that might look like this](https://www.cloudynights.com/uploads/monthly_04_2008/post-11401-14072472558332_thumb.jpg) and the particular dark bands form a “fingerprint” identifying the various substances.
A distant planet outside our solar system, I don’t think we can separate its light directly like that. But we can watch how the spectrum of the parent star changes as its planet moves behind/alongside/in front of the star, reflecting or absorbing light according to its atmosphere.
There’s other clues, other methods, but that’s a big one.
Latest Answers