Spectral lines are the result of interaction between a quantum system
(usually atoms, but sometimes molecules or atomic nuclei) and a single
photon. When a photon has about the right amount of energy to allow a
change in the energy state of the system (in the case of an atom this is
usually an electron changing orbitals), the photon is absorbed. Then it
will be spontaneously re-emitted, either in the same frequency as the
original or in a cascade, where the sum of the energies of the photons
emitted will be equal to the energy of the one absorbed (assuming the
system returns to its original state). The direction and polarization of
the new photons will, in general, correlate with those of the original
In other words The spectral lines are the result of the Electrons around
the atom. Electrons are directly proportional to the number of protons
in an atom. Helium has lesser no. of electron compared to other nobel gas. The more
electrons an atom has the more spectral lines it is able to produce.
Please appreciate my help, by selecting my answer as the best, and add me as your tutor, Thanks!