When the electrons located inside an atom become excited, they emit radiation or light. Every electron in an atom is housed in a shell that contains its own frequency, which will begin to oscillate when heat or an electric field is applied to the atom.
Excited electrons move from their ground state to a higher state. When they return to their normal state. they will emit photons of energy that correspond to specific wavelengths of light. The color of light or flame that an element produces provides a fingerprint that helps scientists identify which element they are examining. For example, copper has a blue-colored flame, while sodium produces a yellow one.