A planet need not be seen to have its atmosphere examined. Starlight does the work. When a planet passes in front of its star, a small fraction of the light filters through its outer atmosphere, where molecules absorb particular wavelengths and leave a pattern in the light that reaches a telescope.
That pattern is more revealing than any imagined portrait of a blue glowing world. Through transmission spectroscopy, astronomers compare the star's spectrum during a transit with its spectrum outside the transit; the difference can suggest which gases are present. Each molecule absorbs light at characteristic wavelengths. Water vapor, carbon dioxide and methane can leave identifiable signatures, although a match is rarely a simple verdict. Clouds can hide signals. So can variations in the star itself, whose spots and other surface features may complicate the comparison.
The hardest part is not collecting a spectrum but deciding what it permits us to claim. Different combinations of gases, clouds and temperatures can produce similar measurements, so researchers test competing atmospheric models against the observations and report uncertainties rather than a complete inventory. Repeated transits help. Observations at additional wavelengths can also distinguish between explanations, while measurements of a planet's heat or reflected light offer other clues when conditions allow. Even a detected gas does not by itself establish whether a planet could support life. The blue glow belongs to the illustration; the planet's actual air must speak through a faint alteration in borrowed light.