Cu2ZnSnS4 (CZTS) thin film has been synthesized by a sol-gel spin-coating technique on the n-Si substrate to fabricate heterojunction photodiodes. An X-ray diffraction study has shown that the film is polycrystalline with a strong (224) preferred orientation of CZTS and there are also multiphase structures. Atomic force microscopy studies have revealed that spherical nanoparticles have homogenously scattered on the surface of the film and the surface roughness has been found to be 4.65nm. The optical bandgap value has been found to be 1.54eV, which is very suitable for photovoltaic and optoelectronic applications. The electrical properties of Al/CZTS/n-Si/Al diode have been investigated by using current-voltage measurements. The Al/CZTS/n-Si/Al heterojunction photodiode has shown a rectification behavior, and its ideality factor and barrier height values have been found to be 2.69 and 0.70eV, respectively. The values of series resistance from dV/d(lnI) versus I and H(I) versus I curves have been calculated to be 4.3 and 4.7k, respectively. It has been seen that there is a good agreement between the two values. The obtained results indicate that the Al/n-Si/Cu2ZnSnS4/Al diode can be used as a photodiode in optoelectronic applications, especially for solar energy conversion.