  Free electron beams such as those employed in electron microscopes have
evolved into powerful tools to investigate photonic nanostructures with an
unrivaled combination of spatial and spectral precision through the analysis of
electron energy losses and cathodoluminescence light emission. In combination
with ultrafast optics, the emerging field of ultrafast electron microscopy
utilizes synchronized femtosecond electron and light pulses that are aimed at
the sampled structures, holding the promise to bring simultaneous
sub-Angstrom--sub-fs--sub-meV space-time-energy resolution to the study of
material and optical-field dynamics. In addition, these advances enable the
manipulation of the wave function of individual free electrons in unprecedented
ways, opening sound prospects to probe and control quantum excitations at the
nanoscale. Here, we provide an overview of photonics research based on free
electrons, supplemented by original theoretical insights, and discussion of
challenges and opportunities. In particular, we show that the excitation
probability by a single electron is independent of its wave function, apart
from a classical average over the transverse beam density profile, whereas the
probability for two or more modulated electrons depends on their relative
spatial arrangement, thus reflecting the quantum nature of their interactions.
We derive first-principles analytical expressions that embody these results and
have general validity for arbitrarily shaped electrons and any type of
electron-sample interaction. We conclude with perspectives on various exciting
directions for disruptive approaches to non-invasive spectroscopy and
microscopy, the possibility of sampling the nonlinear optical response at the
nanoscale, the manipulation of the density matrices associated with free
electrons and optical sample modes, and applications in optical modulation of
electron beams.
