How is light produced?

               Light is given off by atoms that have gained extra energy. This excess energy is released in the form of light or heat. Such atoms become excited by absorbing energy from other source. Atoms can also become excited when heated. The atoms of the heated material move around rapidly and collide with one another, becoming excited and emitting their extra energy as light. The colour of the light produced depends on how much energy is released. A few substances store extra energy and then release it gradually. These substances, such as the glowing paints used on watch faces, are phosphorescent. Other substances only produce light when exposed to other forms of energy; for example fluorescent substances may glow brightly when exposed to ultraviolet light.

Picture credit: google