A n-ZnO/p-Si thin film heterojunction has been fabricated by a low cost sol-gel technique. The wavelength dependent photoresponse properties of the heterojunction is investigated in detail by studying the effect of light illumination on current-voltage (I-V) characteristics, photocurrent, and photocapacitance spectra at room temperature. It shows good diode characteristics with IF/IR=3.4×103 at 4 V and reverse leakage current density of 7.6×10-5 A cm-2 at -5 V. From the photocurrent spectra, it is observed that the visible photons are absorbed in the depleted p-Si under reverse bias conditions, while ultraviolet (UV) photons are absorbed in the depleted n-ZnO under positive bias conditions. This indicates that such a sol-gel n-ZnO/p-Si thin film heterojunction can be used to sense both UV and visible photons though the photoresponse for UV is much slower than that of visible. The photocapacitance measurements suggest the presence of a shallow defect level in the sol-gel derived ZnO film which acts as an electron trap at ∼0.16 eV below the conduction band.