When an electron moves, it absorbs or produces energy in the form of photons. Electrons surround the nucleus, which is made up of protons and neutrons, and they all form an atom. The exchange or sharing of electrons between atoms is the main cause of chemical bonding.
Hope this helps you :)