Sodium salts give an intense yellow color (color code #FFFD2E) to flame. Salts of other metals also show color in flame tests, as seen in the following experiments below.
Upon heating, the electrons of metal atoms are excited to states of higher energy; the excess energy is emitted as light of some particular wavelength, as they return to their original states. The spectrum of sodium contains an intense double line at 589 nm wavelength. The coloring of flames by metal salts is used for instance in analytical chemistry but also for fireworks.
FLAME TESTS OF SALTS