Research based on various temperatures always provides beneficial awareness in the fabrication of a vital photodetector for significant applications. Increasing temperature and including dopants in photodetector materials will influence the functioning of the photodetector. This study included the influence of temperature on pure and doped SnO2 photodetectors. The crystal structure of stannic oxide has been modified by adding cationic dopants, namely Mg2+ and Cu2+, through co-precipitation techniques. Various characterization techniques were employed to examine the impact of Mg2+ and Cu2+ on the Sn4+ lattice. The electrical properties of the materials were studied at different temperatures using the Hall effect. Pure SnO2, Mg-doped SnO2, and Cu-doped SnO2 nanoparticles were synthesised separately and used as photodetectors using fluorine-doped tin oxide film as a conductive medium. The fabricated photodetectors are optimized by current-voltage characteristics at different temperatures. The effects of defects in crystal structure, oxygen vacancies, carrier concentration, and temperature on the photodetectors were studied. Comparative studies of pure and doped SnO2 photodetectors revealed that temperature and crystal defects play a significant role in photoconduction.