Recently, many researchers pay attractive attention to organic memory technology. Polyimide film was used as the resistive switching layer of nonvolatile photomemory in this study. In order to improve the performance of the device, different wavelengths of Ultraviolet (UV) light were used to operate the device, and its impact on the polyimide film was discussed. In this paper, three different UV light bands, UVA, UVB, and UVC, are used to switch devices between low resistance state (LRS) and high resistance state (HRS). It can be seen from the results that all three kinds of energies of UV light can transform the polyimide film from HRS to LRS successfully. According to the data, after 1s of UVB irradiation, the LRS current of polyimide-based photomemory device is the largest, and the data retention ability is also the best, the second is to irradiate UVA, and the last is to irradiate UVC. The results of the optical properties and electrical properties are coincidental. Therefore, different UV energies can affect this photomemory device.