Photocatalytic and photoelectrochemical water splitting under irradiation by sunlight has received much attention for production of renewable hydrogen from water on a large scale. Many challenges still remain in improving energy conversion efficiency, such as utilizing longer-wavelength photons for hydrogen production, enhancing the reaction efficiency at any given wavelength, and increasing the lifetime of the semiconductor materials. This introductory review covers the fundamental aspects of photocatalytic and photoelectrochemical water splitting. Controlling the semiconducting properties of photocatalysts and photoelectrode materials is the primary concern in developing materials for solar water splitting, because they determine how much photoexcitation occurs in a semiconductor under solar illumination and how many photoexcited carriers reach the surface where water splitting takes place. Given a specific semiconductor material, surface modifications are important not only to activate the semiconductor for water splitting but also to facilitate charge separation and to upgrade the stability of the material under photoexcitation. In addition, reducing resistance loss and forming p-n junction have a significant impact on the efficiency of photoelectrochemical water splitting. Correct evaluation of the photocatalytic and photoelectrochemical activity for water splitting is becoming more important in enabling an accurate comparison of a number of studies based on different systems. In the latter part, recent advances in the water splitting reaction under visible light will be presented with a focus on non-oxide semiconductor materials to give an overview of the various problems and solutions.