When we do problems with optics and refraction, we’re usually given a set of indices of refraction to work with; for example, the index of refraction in air is about 1.00, the index of refraction in water is 1.33, etc. However, the index of refraction also varies with wavelength, and these given indices are usually based on yellow light (wavelength = 589 nm). Why is it that we use yellow light as the standard? When we do problems with refraction, why do we take the index of refraction for yellow light whenever the wavelength of light we’re dealing with is unspecified?
For many materials the change in refractive index over the range of visible wavelengths isn't huge, so it's not a bad approximation to take a single value. The range of visible wavelengths is from about 400nm to 700nm, so the middle wavelength is 550nm. As it happens, the sodium D lines are not far from this, at 589nm, and since they are bright and easy to produce they've become an unofficial standard for quoting the refractive index.
As CuriousOne says in a comment, for precise work you would use a graph of refractive index against wavelength (or some empirical fit). Where we need to take some account of the refractive index change, but it doesn't have to be that accurate, a rough measure of the dispersion is given by the Abbe number. Manufacturers will often quote the refractive index at 589nm plus the Abbe number.