When using monochromatized X-rays, the energy that one photon imparts on an electron is a known quantity. The binding energy of the ejected electron can then be determined from:
Ebinding= Ephoton - EkineticThe energy of the photon is usually enough to eject not only valence electrons but also the core electrons of an atom. Because the energy of core electrons is very specific for the element that the atom belongs to, the spectrum gives information on the elemental composition of the shallow surface region.
From small shifts in the binding energies additional chemical information can be derived (e.g. the oxidation state of the element).