The chemical composition of an exoplanet atmosphere can tell us much about conditions on the planet and if it is potentially life bearing. Many planets it's discovered using the transit method. When a planet passes in front of its star a small drop of light will occur. By looking at the transit with different wavelength of the light scientists can find out the chemical composition of the atmosphere. Let's say if the planet does not have an atmosphere all colors (wavelengths) of the light will be blocked equally at the transit. But if the planet does have an atmosphere some atoms will absorb light better at certain wavelengths making the light not equally blocked. If the depth of the blocked light from the star is larger when being looked at a certain color with a spectrograph then the atmosphere will contain the element that is absorbing that color. This method is called transmission spectroscopy and to be able to find molecules like water scientist need to look at the longer wavelength in the infrared spectrum. Most of the discoveries of atmospheres are of hot Jupiters or hot Neptunes as the heated atoms or molecules will absorb light better at high temperatures.
The first detection of an atmosphere around an exoplanet was in 2001 when sodium was detected on the hot Jovian named HD 209458 b that is also known under the nickname Osiris.
Osiris that is located in the constellation Pegasus 159 light-years from us is known for several first discoveries in exoplanet research.
It was the first transiting exoplanet and the first planet to have its orbital speed and mass measured. The planet has an evaporating hydrogen atmosphere and containing oxygen and carbon. In 2013 water vapor was detected in the atmosphere of Osiris and several other hot Jovians like XO-1b, WASP-12b, WASP-17b, and WASP-19b. Water vapor was also reported on HAT-P-11 b in September 2014. HAT-P-11b is a Neptune sized exoplanet and that was also the first time any molecules was discovered on such a small planet.
In February 2016, it was announced that Hubble Space Telescope had detected hydrogen and helium in the atmosphere of 55 Cancri e. 55 Cancri e is a super-Earth exoplanet with a diameter just twice as Earth. 55 Cancri e is a very hot planet with an average temperature of 2,300 °C on the dayside. No water vapor was discovered on the planet. In 2018 iron and titanium was found in the atmosphere of a super-hot Jovian Kelt-9 b
The most recent discovery of an atmosphere was on GJ 3470 b. It is a Super-Earth about 14 earth masses. But it’s atmosphere contains hydrogen and helium and seems to lack heavier elements like methane and ammonia.