Nanozymes are ideal materials for designing colorimetric sensors, and the spontaneous catalytic effect in most of nanozymes commonly leads to instability of the colorimetric signal. To improve this limitation, photoresponsive nanozymes as a switch under specific-light irradiation are used to regulate the reaction process in a controlled manner. Strontium titanate (SrTiO3) is a high-performance photocatalyst, whose heterojunctions formed with reduced graphene oxide (rGO) are promising to efficiently induce the separation of carriers, further generating abundant radicals to colorize the substrate. Here, the SrTiO3-rGO composites with a high specific surface area were synthesized by hydrothermal method and showed excellent peroxidase-like activity under ultraviolet irradiation. The affinity for 3,3′,5,5′-tetramethylbenzidine is equivalent to 19 times that of horseradish peroxidase and the reaction mechanism is analyzed based on reactive intermediates(·O2-) and elemental valence changes. A colorimetric sensor based on SrTiO3-rGO with high sensitivity, low limit (56 nM), and wide linear range (1–100 µM) is constructed for detecting tannins in tea samples. This visualization model provides a reliable idea for the quantitative analysis of trace substances.