In this study, the pulsed laser deposition (PLD) method was employed to fabricate nanostructured BaTiO3 films on glass and silicon substrates at varying temperatures. The structural analysis confirmed the formation of crystalline nanostructured BaTiO3 with mixed tetragonal and hexagonal phases, and the film deposited at 150 °C has the best crystallinity and largest particle size. The optical energy gap of the BaTiO3 nanostructure decreases from 3.94 to 3.84 eV, with increasing substrate temperature from 60 to 150 °C. Photoluminescence spectra of BaTiO3 films deposited at 25, 60, 100, and 150 °C exhibit emission peaks centered at 450, 512, 474, and 531 nm, respectively. Raman spectra of BaTiO3 films show E (LO), A (TO), E (LO) + TO, and B1 vibration modes. Hall measurements reveal that the mobility of the BaTiO3 film increases with temperature up to 100 °C and then decreases at 150 °C. The current–voltage characteristics of the BaTiO3/p-Si heterojunction, deposited over a temperature range of 25 to 150 °C, were investigated in the dark and under illumination. The heterojunctions exhibit rectifying properties, with the best rectification factor observed for the heterojunction prepared at 100 °C. The values of the ideality factor for the heterojunctions fabricated at 25, 60, 100, and 150 °C were 4.3, 3.8, 2.8, and 5, respectively. The study reveals an improvement in both the figures of merit and the photodetector performance with increased substrate temperature. The responsivity increases from 2.2 to 9.25 A/W as the deposition temperature rises from 25 to 100 °C. The detectivity (D*) and external quantum efficiency (EQE) of the photodetector prepared at the optimum substrate temperature of 100 °C, were found to be 4.62 × 1012 Jones and 114%, respectively, at 500 nm.