Toxic pollutants in the environment, such as toxins and abused drugs, have posed a major threat to human health and ecosystem security. It is extremely desirable to develop simple, low-cost, sensitive, and reliable techniques for the detection of these pollutants in the environment. As a booming analytical method, photoelectrochemical (PEC) sensors possess low background noise and high sensitivity. The performances of PEC sensors are fundamentally related to the photoelectric conversion efficiency, which mainly depends on the properties of photoactive materials. This review aims to summarize the engineered photoactive materials, i.e., semiconductors and semiconductor-based heterojunctions, as well as their actual applications, with emphasis on sensing mechanisms in PEC sensors for the analysis of toxins and abused drugs in the environment. Finally, the future research perspectives in this field are also discussed.