The rising energy conflicts and environmental pollution are calling for the rapid development of advanced techniques such as photoelectrocatalysis to transform waste into energy and to clean contaminated media. Here we review photoelectrocatalysis for removing wastewater contaminants and recovering energy such as electricity and hydrogen (H2), with focus on the basics of photoelectrocatalysis, charge kinetics, selecting a photoelectrode, and performance. Modification strategies such as heterostructure formation and doping are discussed. We present applications such a hydrogen production coupled with wastewater treatment, carbon dioxide reduction coupled with pollutant degradation, energy production coupled with wastewater treatment, and microbial fuel cells for electricity generation and pollutant degradation.