Since hydrogen fuel involves the highest energy density among all fuels, production of this gas through the solar water splitting approach has been suggested as a green remedy for greenhouse environmental issues due to extensive consumption of fossil fuels. Low-dimensional materials possessing a large surface-to-volume ratio can be a promising candidate to be used for the photocatalytic approach. Here, we used extensive first-principles calculations to investigate the application of newly fabricated members of two-dimensional carbon nitrides including tg-CN, hg-CN, CN, and CN for water splitting. Band engineering via N-type, P-type, and isoelectronic doping agents such as B, N, P, Si, and Ge was demonstrated for tuning the electronic structure, optimizing solar absorption and band alignment for photocatalysis. Pristine tg-CN, hg-CN, and CN crystals involve bandgaps of 3.190, 2.772, and 2.465 eV, respectively, which are not proper for water splitting. Among the dopants, Si and Ge dopants can narrow the band gap of carbon nitrides about 0.5-1.0 eV and also increase their optical absorption in the visible spectrum. This study presents the potential for doping with isoelectronic elements to greatly improve the photocatalytic characteristics of carbon nitride nanostructures.