How was hydrogen gas (H) obtained by spectroscopists? Why is there more H than H2 in space? Introductory quantum mechanics lessons talk about emission and absorption spectra for the hydrogen gas, and then give you an explanation as if this gas were pure $H$ atoms, and not the $H_2$ molecule (which is what "hydrogen gas" is really).
My intuition is that creating $H$ gas in the lab is very hard (as opposed to $H_2$ gas). 
So how could they achieve this previously (in the time of early spectroscopists)? How does one do it today? 
Also, hydrogen spectra are important for astronomical reasons. I can't wrap my head around why unbound $H$ atoms are lot more prevalent than $H_2$ molecules in space. Is this because of the low density and hence low collision probability out there? Isn't $H_2$ supposed to be a lot more stable than $H$?
 A: 
My intuition is that creating H gas in the lab is very hard (as opposed to H$_2$ gas). 

Not at all; any sufficiently hot hydrogen plasma will have a greater abundance of H than of H$_2$. To see why this is so, it is sufficient to consider the energies of the molecular bond relative to the ionization energy.
The energy of the bond in a hydrogen molecule is 4.5 eV, whereas the ionization energy is 13.6 eV. Imagine you have a very hot plasma in which the hydrogen is fully ionized, and that you slowly lower the electron temperature. In the 15 - 20 eV temperature range, a significant fraction of the ions and electrons will recombine, at least in a transient way. Below 13.6 eV electron temperature, atomic hydrogen will dominate the mix. Only when you get to significantly lower temperatures, well below 10 eV, will molecular hydrogen start to form in any significant quantities.
The challenge with generating the molecular emission spectrum is to maintain sufficiently high temperatures and densities for measurable emission, but at the same time to prevent atomic emission from dominating the spectrum. One approach is mentioned in this paper, which also gives the molecular spectrum in case you're interested.
As for the spectrum in space, the interstellar medium is mostly H$_2$ gas. Only when you get to emission nebulae near young, hot stars is there a significant contribution from atomic hydrogen emission arising from transient recombination of the plasma in these regions. This gives such nebulae their characteristic pink colour
