The (110) plane-type Sr2Ta2O7 layered perovskite nanosheets without impurity phases were successfully prepared by a simple and cost-effective molten salt synthetic method using a eutectic NaCl/KCl medium at a low temperature of 750 °C for only 4 h. Under UV light irradiation, the photocatalytic activity of the Sr2Ta2O7 nanosheets showed 49 times higher than that of anatase TiO2 for hydrogen generation from aqueous methanol solution. By subsequently incorporating nitrogen, experimental and theoretical results both confirmed that the direct band transition for oxides was transformed into the indirect one for oxynitrides, with a significant decrease in the measured band gaps from 4.5 eV to 2.2 eV. The obvious absorption band in the visible-light region and in-situ photodeposition of the O2-evolving CoOx cocatalysts synergistically enhanced the steady O2 evolution for visible-light-driven water oxidation catalysis.