Photovoltaic systems have reached impressive efficiencies, with records in the range of 20-30% for single-junction cells based on many different materials, yet the fundamental Shockley-Queisser efficiency limit of 34% is still out of reach. Improved photonic design can help approach the efficiency limit by eliminating losses from incomplete absorption or non-radiative recombination. This Perspective reviews nanopatterning methods and metasurfaces for increased light incoupling and light trapping in light absorbers and describes nanophotonics opportunities to reduce carrier recombination and utilize spectral conversion. Beyond the state-of-the-art single junction cells, photonic design plays a crucial role in the next generation of photovoltaics, including tandem and self-adaptive solar cells, and to extend the applicability of solar cells in many different ways. We address the exciting research opportunities and challenges in photonic design principles and fabrication that will accelerate the massive upscaling and (invisible) integration of photovoltaics into every available surface.