I always thought that the electrons closer to the nuclei have less energy. Thus when you excite them, making them rise to a higher level by giving them more energy then later they give off the energy in the form of light as they return to the lower levels. Or is mass-energy something way different?