In the present paper, an innovative approach to enhance the photocatalytic efficiency and energy of photovoltaics by modifying the surface morphology of TiO2 is demonstrated. The photovoltaic device provides sustainable power efficiency in TiO2 (TO) and Cd-TiO2 (CTO) thin films grown through spray pyrolysis. The structural and optical properties of the prepared undoped and Cd doped TiO2 thin films were studied. The morphology and content of the produced samples were studied using scanning electron microscopy (SEM with EDAX). A UV-Vis spectrophotometer was used to record the optical absorption spectra of TiO2 nanoparticles. XRD analysis showed that TO and CTO had anatase structures, and the average crystalline size was calculated as 132.0 nm. The photocatalytic efficiency of TO and CTO for degradation of Rodhamine B (RhB) dye was examined. Also, power-voltage (P-V) and photocurrent-voltage (I-V) output current intensity relations were discussed.