The exploitation of simply processed p-type semiconductors and photodetectors with promising optoelectrical properties remains challenging yet essential for current and future advanced optoelectronic applications. Transparent p-type CuI and Sn-doped CuI (Cu-Sn-I) films and their self-powered photodetectors have been successfully fabricated by the spraying method. It is found that the incorporation of Sn dopants enhances the optical, electrical, and photoelectric properties of CuI thin films as well as their corresponding self-powered heterojunction photodetectors. This improvement of the optoelectrical properties of the Cu-Sn-I film and its photodetector can be attributed to the adjustment of the acceptor defect level and increased hole concentration resulting from Sn doping. The Cu-Sn-I/n-Si photodetector exhibits a responsivity of 10.7 mA/W, a detectivity of 6.79 × 1011 Jones, and a response time of 77 μs/30 μs (0 V bias). The response time exhibits the fastest rise and decay times compared with the other CuI-based self-powered UV photodetectors in recent years, showcasing promising applications in the realm of transparent electronics moving forward. This study also presents an effective strategy for enhancing the electrical properties of p-type semiconductors and devices through effective doping.