Emission and reflection nebulae
The above image shows the Bubble nebula, a huge bubble of dust and gas expanding from the stellar wind from a massive central star. In the upper left is another object, a giant molecular cloud. The radiation from the nebula is heating up the molecules in the molecular cloud, causing it to glow. The spectrum of the light from molecular matter contains spectral lines not seen in a simple gas. Molecules are more complex, and can have excitation states arising from rotation and vibration within the molecule.