Astronomers are using powerful telescopes to detect molecules in the atmospheres of distant planets, nebulae, and faraway galaxies.