Spectrometers function by dispersing light into its constituent wavelengths using a prism or diffraction grating. The resulting spectrum is then detected and analyzed. In nanotechnology, this helps in identifying the presence of specific materials and their structural characteristics based on their spectral signatures.