The main purpose of this study is to investigate the influence of Ga doping ratio on the electrical and optical properties of ZnO. Pure ZnO and Ga-doped ZnO solutions were procured using sol-gel spin coating technique. Next, this solution was deposited onto the p-Si substrate to obtain homogenous thin films. After that, photodiodes were produced using these films. When the process was complete, the morphological structure of the thin films and the electrical and optical properties of the photodiode were studied. Within this scope, while absorbance and transmittance of the thin films were characterized using UV-Vis spectrophotometry, the morphological properties of the thin films were analyzed using atomic force microscope (AFM) and the roughness and fiber size were analyzed using AFM analysis software. On the other hand, the band gap of the thin films was determined using optical absorption values. Additionally, the photocurrent of the ZnO/p-Si photodiode was studied under dark conditions and under various illumination intensities. Likewise, the capacitance and conductance of the photodiode were studied. In addition to these parameters, the R-s-V, C-V, C-adj-V, and G(adj)-V characteristics of the photodiode were also studied and the obtained results illustrated graphically. The results showed that the electrical and optical properties of ZnO can be improved and controlled via Ga doping ratio. Therefore, the produced photodiode can be used in optical electronics for different applications as either a photodiode or photosensor.