This tag is for questions regarding to Photon Emission. Photons are emitted by the action of charged particles, mainly due to making a transition from a high energy state to a lower energy state. Although they can be emitted by other methods including radioactive decay.
When the electron changes levels, it decreases energy and the atom emits photons. The photon is emitted with the electron moving from a higher energy level to a lower energy level. The energy of the photon is the exact energy that is lost by the electron moving to its lower energy level. $$\text{E}_\text{photon}=\Delta\text{E}_\text{electron}=\text{E}_\text{upper}-\text{E}_\text{lower}$$