Sr2Ta2O7 and Sr2Nb2O7 with similar layered perovskite structure showed activities for water splitting into H2 and O2 in pure water without any additives under UV irradiation. The band gaps of Sr2Ta2O7 and Sr2Nb2O7 were 4.6 and 3.9 eV, respectively. Sr2Ta2O7 gave H2 and O2 from pure water under UV irradiation even in the absence of a cocatalyst. The activity of Sr2Ta2O7 was much increased by loading NiO as a cocatalyst even without pretreatment. The quantum yield of the NiO(0.15 wt %)/Sr2Ta2O7 photocatalyst was 12% at 270 nm. On the other hand, native Sr2Nb2O7 did not possess the activity. The high activity was obtained for the Sr2Nb2O7 photocatalyst when NiO was loaded and pretreated. Factors affecting the photocatalytic activities were discussed by using the Sr2Ta2O7 and Sr2Nb2O7 powder with similar layered perovskite structure. A predominant factor affecting the photocatalytic behavior of Sr2Ta2O7 and Sr2Nb2O7 is the conduction band levels formed by Ta5d and Nb4d.