In the present study, cadmium sulfide (CdS) thin films were deposited on different substrates [soda glass, fluoride doped tin oxide, and tin doped indium oxide (ITO) coated glass] by a hot plate method. To control the thickness and the reproducibility of the sample production, the thin films were coated at different temperatures and deposition times. The CdS thin films were heated at 400 °C in air and forming gas (FG) atmosphere to investigate the effect of the annealing temperatures. The thickness of the samples, measured by ellipsometry, could be controlled by the deposition time and temperature of the hot plate. The phase formation and structural properties of CdS thin films were studied by X-ray diffraction and scanning electron microscopy, whereas the optical properties were obtained by UV–vis spectroscopy. A hexagonal crystal structure was observed for CdS thin films and the crystallinity improved upon annealing. The structural and optical properties of CdS thin films were also enhanced by annealing at 400 °C in FG atmosphere (95 % N2, 5 % H2). The optical band gap was changed from 2.25 to 2.40 eV at different annealing temperatures and gas atmospheres. A higher electrical conductivity, for the sample annealed at FG, was noticed. The samples deposited on ITO and annealed in FG atmosphere showed the best structural and electrical properties compared to the other samples. CdS thin films can be widely used for application as a buffer layer for copper–indium–gallium–selenide solar cells.