Different bond energies between atoms in molecules represent different flame colours when said molecules undergo combustion.
Differing atoms bond with different amounts of energy. A bond is determined by an atoms outermost electrons (using the Bohr-model of an atom these exist in an orbit far from the nucleus of the atom).
As each bond between different atoms is of a different energy, then the amount of energy required to break each bond is therefore different also.
A flame test uses this principle. For example, when Sodium (in it's elemental form of