Simply put, they don't differ except on what light they are spectrograms of.
Any light can be analysed into a spectrogram. This includes sunlight.
Spectrograms of lightbulbs and the light will differ from sunlight spectrograms in having fewer discrete frequencies (or wavelengths). This is because bulbs are much more simple than the sun, and involve just a few simple excitation reactions, whereas the Sun involves excitation processes, fusion processes and fission processes.