Since they are both examples of moving waves, they both transmit energy.
If bonds are broken, the energy is released, and if bonds are formed, energy is absorbed. During conversions from chemical energy to thermal energy, the energy stored in the chemical bonds are released and this energy causes surrounding molecules to move faster thus increasing the thermal energy of a substance.
A free electron is one which has become detached from a covalent bond between two atoms and is able to move around from atom to atom and possibly take part in electric current flow.
Temperature is the energy