The color of light a chemical burns depends on the energies of the photons, which are determined by the energy it takes to move electrons from one orbit to another. Colors are distinctive to each chemical, so the color that is emitted depends on which element is placed into the flame.
A flame test is an analytical procedure that helps identify the presence of certain elements in a substance. When placed into a flame, salt will produce a yellow glow. This glow is the same glow that a sodium street light emits. Boric acid will emit a green flame due to the presence of boron.