  One of the primary targets of current and future cosmological observations
are light thermal relics of the hot big bang. Within the Standard Model of
particle physics, an important thermal relic are cosmic neutrinos, while
interesting extensions predict new light particles which are even more weakly
coupled to ordinary matter. These elusive particles may nonetheless be produced
efficiently in the early universe and their gravitational influence could be
detectable in cosmological observables. In this thesis, we describe how
measurements of the cosmic microwave background (CMB) and the large-scale
structure (LSS) of the universe can shed new light on the properties of
neutrinos and on the possible existence of other light relics.
  These observations are remarkably sensitive to the amount of radiation in the
early universe, partly because free-streaming species such as neutrinos imprint
a small phase shift in the baryon acoustic oscillations (BAO) which we study in
detail. Building on this analytic understanding, we provide further evidence
for the cosmic neutrino background by independently confirming its
free-streaming nature in CMB and LSS datasets. In particular, we establish a
new analysis of the BAO spectrum resulting in the first measurement of this
imprint of neutrinos in the clustering of galaxies.
  Future cosmological surveys, such as the next generation of CMB experiments
(CMB-S4), have the potential to measure the energy density of relativistic
species at the sub-percent level and will therefore be capable of probing
physics beyond the Standard Model. We demonstrate how this can be achieved and
present an observational target which would allow the detection of any light
particle that has ever been in thermal equilibrium. Interestingly, even the
absence of a detection would result in new insights by providing constraints on
the couplings to the Standard Model. [Abridged]
