Monoclinic WO3 thin films have been effectively deposited by a simple spray pyrolysis technique at a molar concentration of 0.01 M on a glass substrate in the temperature range of 473 to 673 K. These WO3 films were used as an interlayer between the metal and the semiconductor, which formed the basic structure of the photodetector. Effect of substrate temperature on WO3 films during the process of the deposition was systematically interpreted with respect to the structural, morphological, optical and electrical properties of the WO3 films. The x-ray diffraction pattern revealed the polycrystalline nature of the prepared films with monoclinic phases. At the substrate temperature of 623 K, the nano-thin films were strongly bonded to each other as observed from the FE-SEM images. Visible and ultraviolet spectroscopies indicated the band gap (Eg) of the WO3 thin film is 3.30 eV. The dc electrical study recorded a sharp increase in the electrical conductivity of the prepared film at substrate temperature of 623 K for tungsten trioxide. It is worth noting that all diodes showed a positive photoresponse under illumination. In particular, the photodetector with the thickness of 300 nm showed higher responsivity 0.02 A/W and detection specificity 8.29 × 1010 Jones.