The heat given off by the combustion reaction causes electrons in the metal atoms to be excited to higher energy levels. These excited states are unstable, so the electron quickly returns to its original energy (or ground state), emitting excess energy as light.