How do astronomers determine the texture of an exoplanet? So I was wondering how astronomers are able to get the texture/detail of an exoplanet or how they know a planet has water or not.  I know how they discover planets by using the light of a star and seeing if it gets faint or by seeing if the star is getting gravitationaly pulled back and forth,  to determine the planet size. But I just don't understand how they are able to get the texture of a planet. Thanks for the help!
This is known as spectroscopy.  Every molecule and atom in the universe emits and absorbs light at specific frequencies.  This is a result of the quantization of the energy levels (for electrons) in an atom.  Although there are lots of complicating factors, such as redshift, to account for, the patterns are usually so distinctive that the complications can be accounted for, and do not prevent scientists from figuring out chemical compositions (and even, to some extent, how abundant each chemical is).

For example, here are the emission spectra of several common atoms at rest (with respect to the observer):

Absorption spectra, on the other hand, appear as darker regions in the band.  Here's an example of an absorption spectra, which identities several elements by knowing that it is distinguished by absorbing light at specific wavelengths that others do not:


For exoplanets with significant atmospheres, we can only expect to see the spectra for its upper atmosphere.  All other signals will be muted out by the rest of the atmosphere.  We will not be able to tell what the surface looks like, or what it is made of.