The only alternative to sending probes is by measuring through remote sensing. Remote sensing is any measurement without actually "being there" (which includes what your eyes are doing!). For remote sensing of atmospheric properties, pretty much the only way¹ is by measuring electromagnetic radiation: either radiation emitted by the atmosphere, or radiation emitted by another source and then absorbed by the atmosphere. Detailed information can be obtained through spectroscopy.
Everything emits and absorbs electromagnetic radiation. Different molecules have very specific spectral signatures for their emission as a function of wavelength. This emission further depends on temperature, pressure, and some other factors.
Spectrum of Jupiter, from LASP
Then, we compare the observed spectrum with lab measurements for known species: H₂, H₂O, CH₄, CO₂, etc. We try to add up the different species contributions, until they match the observed spectrum. That is how we can determine the composition.
For more information, see this page at LASP.
Note that this is very commonly used not only for planetary sciences, but also in remote sensing of the Earth atmosphere, such as for weather and climate monitoring. Without atmospheric remote sensing, the daily weather forecast would not exist.
¹Theoretically, gravimetry can be used to get mass distributions, but this requires being very close to the object and then still, atmospheres are not massive enough. But we can measure Earth ocean currents!