Answer
When the electron drops to a lower level, the light is displayed.
Work Step by Step
The different colors are emitted because when the compound is places in the flame, the electrons within the different orbitals are moving from different levels. When the electron drops to a lower level, the light is displayed.