In my last spectroscopy post, I talked about all of the different colors, or types, of light. Now for the cool stuff. Using light, we can tell what something is made out of. For example scientists have found water and organic molecules in the atmospheres of planets orbiting other stars, just by looking at the light.
Figuring out what something is made of can actually be quite simple, though its usually not. Basically ,what scientists do is break down the light. By this, I mean that they take the light and spread it out into a rainbow. When you do this, little lines will appear, or lines will be missing. These are called absorption and emission lines. By looking at the spacing between the lines, we can tell what something is made of. To get a better idea of how this works, take a look at this site. You can see how each element has a distinct fingerprint of lines.
So, if a planet has water in its atmosphere, we see the set of lines for water. If a cloud of interstellar gas is made of hydrogen, we see the lines for hydrogen. This is used constantly by astronomers, like in the recent debate over Enceladus's ocean. This is a amazing technique because it gives us a window into the composition of our universe.
For more information- Astronomy notes