When sufficient energy light waves (x-ray or photon) are absorbed by an atom, the inner shell electrons are excited to an outer shell or removed completely. The empty inner shell that remains is ‘filled’ by electrons from an outer shell of the atom. The difference in energies between the two shells involved is excess energy; which, when generated in this process, is emitted as radiation (fluorescence). In a given element the energy difference between two specific orbital shells is characteristic of that element and is always the same.
Therefore, the emitted light wave will always have the same energy...by determining the energy emitted by a particular sample XRF analyzers are able to identify the element(s) involved.