light is often created or absorbed when an electron gains or loses energy. this energy can be in the form of heat, kinetic energy, or other form. for example, an incandescent light bulb uses heat. the increase of energy can push an electron up one level in a shell called a "valence". this makes it unstable, and like everything, it wants to be in the lowest energy state. (if being in the lowest energy state is confusing, pick up a pencil and drop it. once on the ground, the pencil will be in a lower energy state). when the electron drops back down to a lower energy state, it needs to release the energy that hit it, and it must obey the conservation of energy (energy can neither be created nor destroyed). electrons release this energy as photons, and at higher intensities, this photon can be seen as visible light.