Oh man. :crackup:
Just in case somebody wants to find out an actual answer, optical wavelengths are measured using interferometry. Basically, the interference properties of waves allow certain types of instruments to measure other properties like power over distance or light patterns to find wavelength. Look up wavemeters.
Math and comparison (with spectrometers) were used to find everything between the wavemeter measurements. That's why you only need a calibrated spectrometer to find a wavelength without measuring it. With more modern physics, we've also developed rules that say what wavelength certain amounts of energy and processes should produce. This is ultimately how laser devices are specified. Especially with diodes, there's a semiconductor bandgap which gives how much energy the light off of it can hold. Also, this is why there is a definite wavelength range that prevents very far UV LEDs and laser diodes.