For clean hydrogen (H2) production, electrocatalysis and photocatalysis are widely regarded as promising technologies to counter the increasing energy crisis. However, developing applicable catalysts with high H2 production performances still poses a challenge. In this review, state-of-the-art nanoscale electrocatalysts for water electrolysis and photocatalysts for water splitting, tailored for different reaction environments, including acidic electrolytes, alkaline electrolytes, pure water, seawater, and hydrohalic acids, are systematically presented. In particular, modification approaches such as doping, morphology control, heterojunction/homojunction construction, as well as the integration of cocatalysts and single atoms for efficient charge transfer and separation are examined. Furthermore, the unique properties of these upgraded catalysts and the mechanisms of promoted H2 production are also analyzed by elucidating the charge carrier dynamics revealed by photophysical and photoelectrochemical characterization methods. Finally, perspectives and outlooks on future developments for H2 production using advanced electrocatalysts and photocatalysts are proposed.