The synthesis of photodetectors for ZnO nanostructure films on various substrates, including p-type (100) silicon (Si), and porous silicon (pSi), has been achieved through the utilization of a straightforward technique known as the successive ionic layer adsorption and reaction (SILAR) method. To analyze the optical properties, surface morphology, and crystal structure of the ZnO layers, UV-Vis spectrometers, field emission scanning electron microscopes (FESEM), and X-ray diffraction (XRD) were employed. The characterization of the ZnO samples revealed that the number of SILAR cycles has a significant impact on the morphology and optical band gap of the synthesized layer. The Fourier-transform infrared (FTIR) spectrum successfully detected the distinctive extended vibration mode of ZnO. By conducting 20 cycles, high-quality hexagonal ZnO was obtained. The responsivity of the planar ZnO on silicon (ZnO/Si) and ZnO on the porous silicon (ZnO/pSi) surface exhibited variations depending on the substrate surface and bias voltage. The results indicated that the (ZnO/pSi) heterojunction demonstrated a high response in the visible range (350–850 nm) at a low bias voltage. On the other hand, the (ZnO/Si) photodetector displayed a high sensitivity of 666.66% at a low voltage of 1V in comparison to the (ZnO/pSi) photodetector, which exhibited a sensitivity of 483%.