To be sure that the color is due to sodium, do a flame test. This is used to identify the presence of small number of metal ions in a compound. For sodium, the brilliant color of bright yellow is a result of an excited electron in a very high level of energy and fall to a lower level called the ground state.
In addition, metals have different jump sizes in the energy level and this means that each different metal will have a different pattern of spectral lines, which results to different flame color.