Electrocatalysis and photoelectrocatalysis play a central role in facilitating clean energy conversion and enabling numerous sustainable processes and future technologies. Realizing cost-effective, large-scale utilization of these technologies requires the development of (photo)electrocatalysts exhibiting high activity, selectivity, and stability. While noble metals are the most common and researched electrocatalysts, recently attention has shifted toward noble metal-free semiconductor electrocatalysts, such as metal oxides/sulfides. Although native semiconductors typically exhibit poor electrical conductivity due to a band gap, modifying their electronic properties through structural defects (e.g., anion vacancies, cation vacancies and lattice distortions), phase transitions, conductive additives, and surface strain offers pathways to enhance both conductivity and electrocatalytic activity. Nevertheless atomic-scale insight on how defects and electronic properties impact on semiconductor electrocatalytic activity under operation conditions remains elusive despite extensive investigations.