Every chemical is made up of atoms and each atom has one or more electrons surrounded its nucleus. The electron emits light after changing from a high energy state o to a lower energy state which is known as transition. The color of this light is unique to each element because each atom of a particular element has a different transition energy.