When atoms are excited by a outside energy source ( heat, flame, or electric current) the electrons can be promoted to higher energy states. However, this situation is highly unstable and the electron will eventually return to a lower energy state.
* when the electron returns to a lower energy level, energy is given off in the form of ( quanta), also known as a (photon of light)