Influence of ultraviolet (UV) light irradiation on the corrosion behavior of electrodeposited Ni and Cu nanocrystalline foils in 3.5% NaCl solution was studied by means of electrochemical methods, electron work function (EWF) analysis, and characterization with atomic force microscopy (AFM) and X-ray photoelectron spectroscopy (XPS). It was demonstrated that the influence of solar light on corrosion of the metals was non-negligible, which could be very different for different materials. The UV light irradiation resulted in an increase in corrosion resistance of the Cu foil but showed an opposite influence on that of the Ni foil. Based on surface state analysis, it was concluded that the UV irradiation altered the surface oxide films. The UV light induced the formation of Cu2O on Cu, which is more stable and compacted than naturally formed CuO film. However, the UV light accelerated the formation of Ni2O3, which is loose, porous and brittle, compared to naturally formed NiO on Ni. The changes in oxide films were responsible for the opposite variations in the corrosion behavior of the Cu and Ni nanocrystalline foils caused by the UV light irradiation.