Optoelectronic devices have various applications in medical equipment, sensors, and communication systems. Photodetectors, which convert light into electrical signals, have gained much attention from many research teams. This study describes a low-cost photodetector based on CuO nanoparticles and ZnO nanorods operating in a wide range of light wavelengths (395, 464, 532, and 640 nm). Particularly, under 395 nm excitation, the heterostructure device exhibits high responsivity, photoconductive gain, detectivity, and sensitivity with maximum values of 1.38 A·W−1, 4.33, 2.58 × 1011 Jones, and 1934.5% at a bias of 2 V, respectively. The sensing mechanism of the p–n heterojunction of CuO/ZnO is also explored. Overall, this study indicates that the heterostructure of CuO nanoparticles and ZnO nanorods obtained via a simple and cost-effective synthesis process has great potential for optoelectronic applications.