  We present predictions for the UV-to-mm extragalactic background light (EBL)
from a recent version of the GALFORM semi-analytical model of galaxy formation
which invokes a top-heavy stellar initial mass function (IMF) for galaxies
undergoing dynamically-triggered bursts of star formation. We combine GALFORM
with the GRASIL radiative transfer code for computing fully self-consistent
UV-to-mm spectral energy distributions for each simulated galaxy, accounting
for the absorption and re-emission of stellar radiation by interstellar dust.
The predicted EBL is in near-perfect agreement with recent observations over
the whole UV-to-mm spectrum, as is the evolution of the cosmic spectral energy
distribution over the redshift range for which observations are available
($z\lesssim1$). We show that approximately 90~per~cent of the EBL is produced
at $z<2$ although this shifts to higher redshifts for sub-mm wavelengths. We
assess whether the top-heavy IMF in starbursts is necessary in order to
reproduce the EBL at the same time as other key observables, and find that
variant models with a universal solar-neighborhood IMF display poorer agreement
with EBL observations over the whole UV-to-mm spectrum and fail to match the
counts of galaxies in the sub-mm.
