system
Given the following post, respond as if you're commenting on Reddit:
human
In as simple a way as possible, how are we able to tell the elementary make up of a planet using only a telescope?

Just reading a story about how scientists used the Hubble telescope to view HAT-P-26b, s planet 440 light years away. They saw "distinct signatures of water in its atmosphere" and "found fewer heavy elements than they had expected". How can you do this using only a telescope?
gpt
How does red dye work? It absorbs all colors but red which we see. 

Well it turns out all molecules absorb at some wavelengths or another of light. They just aren't all visible. The wavelengths that molecules absorb at are specific to the individual bonds inside them. Similarly the wavelengths molecules emit when excited are specific to the bonds. 

By measuring the wavelengths of light from distant planets we can get a feel for what molecules are in the atmosphere.