Of course, it can, but it is necessary first to determine the concentration range in which to determine the concentration of metals and related conditions (wavelength, pH, ionic strength, solvent). In terms of creating a metal-ligand complex may be obtained lower values of LOD and LOQ.
yes we can use uv-s for heavy metals but all of the heavy metals have different method which you have to refer from papers and each heavy metal has different wavelength.
There is variety of spectroscopic methodologies with different sophistication levels depending on the element in demand! Much more efforts are needed in case you have a need for quantitative (concentration) measurements. VUV, UV or visible light spectroscopy frequently is appropriate in case you have a need to have "yes" or "not" answer about presence of heavy metal in your sample even in very small concentration!
Historically Uv_vis spectroscpy was one of the first methods used for quantitative determination of heavy metals (as cations) in solution. Fisrt you need to find a suitable ligand, absorbing in the UV-Vis area, which makes complex with the ion of choice. There are many books in the 70ties dealing with this problem. Eevn now there are plenty of papers devoted to ligands design for specific metal ions.
Following reference can help, I asume, to get the background: Metal Complexes in Aqueous Solutions (Arthur E. Martell, Robert D. Hancock, Springer, 2013)
There are some indirect methods for the identification of heavy metals using UV/Vis spectroscopy such as Ag-doped ZnO nanoparticles. To know the details please study the attached article: "UV–vis spectroscopic method for detection and removal of heavy metal ions in water using Ag doped ZnO nanoparticles"