Obtaining H2 energy from H2O using the most abundant solar radiation is an outstanding approach to zero pollution. This work focuses on studying the effect of Co doping and calcination on the structure, morphology, and optical properties of spin-coated SnO2 films as well as their photoelectrochemical (PEC) efficiency. The structures and morphologies of the films were investigated by XRD, AFM, and Raman spectra. The results confirmed the preparation of SnO2 of the rutile phase, with crystallite sizes in the range of 18.4–29.2 nm. AFM showed the granular structure and smooth surfaces having limited roughness. UV-Vis spectroscopy showed that the absorption spectra depend on the calcination temperature and the Co content, and the films have optical bandgap (Eg) in the range of 3.67–3.93 eV. The prepared samples were applied for the PEC hydrogen generation after optimizing the sample doping ratio, using electrolyte (HCl, Na2SO4, NaOH), electrode reusability, applied temperature, and monochromatic illumination. Additionally, the electrode stability, thermodynamic parameters, conversion efficiency, number of hydrogen moles, and PEC impedance were evaluated and discussed, while the SnO2 films were used as working electrodes and platinum sheet as an auxiliary or counter electrode (2-electrode system) and both were dipped in the electrolyte. The highest photocurrent (21.25 mA/cm2), number of hydrogen moles (20.4 mmol/h.cm2), incident photon-to-current change efficiency (6.892%@307 nm and +1 V), and the absorbed photon-to-current conversion efficiency (4.61% at ~500 nm and +1 V) were recorded for the 2.5% Co-doped SnO2 photoanode that annealed at 673 K.