Sr 2 Nb 2 O 7 and Sr 2 Ta 2 O 7 with layered perovskite structures exhibited abilities to accomplish the photocatalytic water-splitting reaction in the ultraviolet region. Their activities could be much increased by loading NiO as a cocatalyst. In this work, we have applied density functional theory calculations to get insights into the role of NiO in modulating the electronic structure, optical absorption, and photocatalytic reaction mechanism of Sr 2 M 2 O 7 (010) (M = Nb and Ta) surfaces. The calculated adsorption energies of −3.15 and −3.37 eV indicate the strong adsorption of NiO clusters on the semiconductor surfaces. The energy levels of the cocatalyst cluster in the valence band maximum are higher than those of the surfaces, which is in favor of the transfer of photoinduced holes from the surface to the cocatalyst. Consequently, NiO can serve as the active site of the water oxidation reaction, in accordance with the previous experimental findings. The formation of interfacial structures between NiO and Sr 2 M 2 O 7 (010) surfaces has seldom influence on the absorption edge of systems, like the experimental observations. The results show that H 2 O tends to molecularly adsorb on the bare surfaces and the dissociation of water is easy to occur on Ni 4 O 4 /Sr 2 M 2 O 7 (010) surfaces, which lead to the much easier generation of HO* intermediates on the latter than the former. The rate-determining step of the oxygen evolution reaction for Sr 2 M 2 O 7 photocatalysts is modified by loading the NiO cocatalyst. The computed overpotentials of the oxygen evolution reaction (OER) are 0.58 and 0.53 V for Ni 4 O 4 /Sr 2 M 2 O 7 (010) surfaces and 1.28 and 1.24 V for native Sr 2 M 2 O 7 (010) surfaces, respectively. The important decrease of overpotentials resulted from loading NiO cluster could be one of the reasons that the remarkable increases in photocatalytic activities were experimentally observed by adding cocatalysts.