Nebula are the composed of ionized gasses and they emit light of various ranges of colors. The hydrogen gas in the nebula glows with a red color. The electrons jump to the excited states, release energy in the form of photons, and come back to the state of lower energy state. The lower is the energy of the excited electron, red will be the color. In a case of higher excitation states, the color comes out to be blue.