We show that the macroscopic magnetic and electronic properties of strongly correlated electron systems can be manipulated by coupling them to a cavity mode. As a paradigmatic example we consider the Fermi-Hubbard model and find that the electron-cavity coupling enhances the magnetic interaction between the electron spins in the ground-state manifold. At half filling this effect can be observed by a change in the magnetic susceptibility. At less than half filling, the cavity introduces a next-nearest-neighbor hopping and mediates a long-range electron-electron interaction between distant sites. We study the ground-state properties with tensor network methods and find that the cavity coupling can induce a phase characterized by a momentum-space pairing effect for electrons.