Why does a particular ion produce a signature flame color?
The ions that produce a flame colour are cations (so, positively charged atoms, like metals). The electrons within the ion will absorb energy from the flame (heat energy) and move to higher energy levels within the sub shell structure. (Called moving from ground state to excited state). However, this arrangement is highly unstable, so the electrons move back – and emit the the previously absorbed energy as photons of light. These fixed energy jumps all produce different colours, and are unique to each element… So, in short, unique flame colour occurs because of the energy absorption of electrons and different electronic configurations of elements.