Yes - and no.
Yes, you can use exactly the same principles to detect and analyze metals on Earth, they are no different from those found everywhere else in the Universe. No, it is not as simple as shining a light in the metal. You need to vaporize the sample and excite atoms, which requires very high temperatures.