A deep understanding of defects is essential for the optimization of materials for solar energy conversion. This is particularly true for metal oxide photo(electro)catalysts, which typically feature high concentrations of charged point defects that are electronically active. In photovoltaic materials, except for selected dopants, defects are considered detrimental and should be eliminated to minimize charge recombination. However, photocatalysis is a more complex process in which defects can have an active role, such as in stabilizing charge separation and in mediating rate-limiting catalytic steps. In this Review, we examine the behaviour of electronic defects in metal oxides, paying special attention to the principles that underpin the formation and function of trapped charges in the form of polarons. We focus on how defects alter the electronic structure of metal oxides, statically or transiently upon illumination, and discuss the implications of such changes in light-driven catalytic reactions. Finally, we compare oxide defect chemistry with that of new photocatalysts based on carbon nitrides, polymers and metal halide perovskites.