Abstract-Investigating the interaction of electron beams with materials and light has been a field of research since more than a century. The field was advanced theoretically by the raise of quantum mechanics and technically by the introduction of electron microscopes and accelerators. It is possible nowadays to uncover a multitude of information from electron-induced excitations in matter by means of advanced techniques like holography, tomography, and most recently photon-induced near-field electron microscopy. The question is whether the interaction can be controlled in an even more efficient way in order to unravel important questions like modal decomposition of the electron-induced polarization, by performing experiments with better spatial, temporal, and energy resolutions. This review discusses recent advances in controlling the electron and light interactions at the nanoscale. Theoretical and numerical aspects of the interaction of electrons with nanostructures and metamaterials will be discussed, with the aim to understand mechanisms of radiation in interaction of electrons with even more sophisticated structures. Based on these mechanisms of radiation, state-of-the art and novel electrondriven few-photon sources will be discussed. Applications of such sources to gain an understanding of quantum optical effects and also to perform spectral interferometry with electron microscopes will be covered. In an inverse approach, as in the case of the inverse Smith-Purcell effect, laser-induced excitations of nanostructures can cause the electron beams traveling in the near-field of such structures to get accelerated, provided a synchronization criterion is satisfied. This effect is the basis for linear dielectric and metallic electron accelerators. Moreover, acceleration goes along with bunching of the electrons. When single electrons are considered, an efficient design of nanostructures can lead to the shaping of the electron wave function travelling adjacent to them, for example to form attosecond electron pulses or chiral electron wave functions.