The atomic emission spectra of a sodium atom on earth and of a sodium atom in the sun would be the same.
When atoms of sodium get excited they move to a higher level and when they move back to the ground level, they emit photons.
Thus the emitted energy of photon depends only on the atom of the sodium (element) and is independent of the atmosphere where it is .Since we are comparing the emission spectra of the same element sodium it is the same on both earth and sun.