The establishment of rapid and efficient contamination detection methods in agricultural fields is of great significance for safeguarding agricultural production and human health, and for ensuring the healthy development of agricultural industries. As a booming analytical method, photoelectrochemical (PEC) sensors, which combine the advantages of electrochemical analysis and optical analysis, have received increasing research attention. Due to the complete separation of the excitation source (light) and the detection signal (current), the background signal of PEC sensors is greatly decreased, and their sensitivity is high. This review aims to cover the advances in PEC sensors for contamination analysis in agricultural fields over the past five years, including analysis of heavy metals, antibiotics, pesticides, and toxins. The future prospects in this field are also discussed.