  I discuss how measurements of the absorption of $\gamma$-rays from GeV to TeV
energies via pair production on the extragalactic background light (EBL) can
probe important issues in galaxy formation. We use semi-analytic models (SAMs)
of galaxy formation, based on the flat LCDM hierarchical structure formation
scenario with $\Omega_m=0.3$ and Hubble parameter $h=0.65$, to obtain
predictions of the EBL from 0.1 to 1000$\mu$m. SAMs incorporate simplified
physical treatments of the key processes of galaxy formation - including
gravitational collapse and merging of dark matter halos, gas cooling and
dissipation, star formation, supernova feedback and metal production -- and
have been shown to reproduce key observations at low and high redshift. We
investigate the consequences of variations in input assumptions such as the
stellar initial mass function (IMF) and the efficiency of converting cold gas
into stars. We also discuss recent attempts to determine the emitted spectrum
of high energy gamma rays from blazars such as Mrk 501 from the observed X-rays
using the synchrotron self-Compton model, and note that our favorite SAM EBL
plus the observed spectrum of Mrk 501 do not imply unphysical upturns in the
high energy emitted spectrum - thus undermining recent claims of a crisis with
drastic possible consequences such as breaking of Lorentz invariance. We
conclude that observational studies of the absorption of $\gamma$-rays will
help to determine the EBL, and also help to explain its origin by constraining
some of the most uncertain features of galaxy formation theory, including the
IMF, the history of star formation, and the reprocessing of light by dust.
