When an electron absorbs energy it becomes excited and moves to a higher energy level called an excited state. This can happen when an atom absorbs light.
Eventually that electron will relax and return to the ground state, which was at a lower initial energy. During this relaxation, the energy that was previously absorbed is now released in the form of light.
This is specifically what occurs during a bright-line spectrum. The excited electrons return to the ground state, which is a lower energy level, and the energy is released as distinct lines of light.