In Absorption Spectroscopy broadband (white) light is shone on a semiconductor sample with a spectrometer collecting any transmitted light on the other side of the sample

For photon energies < Eg the material appears transparent and the light is transmitted through and collected

For photon energies > Eg electrons are excited from the valence band to the conduction band and the material appears opaque

The photon energy where this abrupt change in transmission occurs is Eg