Electrons emit a photon when they return to the ground state configuration. The process is called de-excitation.
For the Bohr atom, electrons emit a photon when they return to the ground state configuration. We call this process de-excitation.
It's important to remember that this energy which the electrons either absorb or emit as a photon is quantized:
This means that the energy of the photon which is emitted must equal the energy difference between the commuted energy states.
Sometimes, we can see the photon if its frequency range is within that of the visible spectrum.
If you're more interested in this subject, I'd consider reading about the photoelectric effect.