Gas discharge tubes usually have one or a few elements making up the gas. The spectral lines in the light depend on the arrangement of electrons in the element and the amounts of energy they need to jump between energy levels (and emit light of a particular frequency when they drop down a level).
The sun has many elements in it so there are far more lines present. In addition the sun has a cooler outer atmosphere and atoms in that can assorb light at particular frequencies resulting in dark lines in the spectrum as well.