Single slit diffraction - choosing a wavelength? For the classic experiment of determining the slit width of a single slit. If we assume the rough order of magnitude of the width is known. What factors determine the choice of wavelength?
(Clearly we want $\lambda<w$ where $w$ is the slit width, but what other factors come in?)
Extension
I heard from someone that we should make the wavelength on the order of the desired resolution, I don't  really understand how resolution comes into this as we are using monochromatic light. Can someone explain if and why this comment makes sense?
(I haven't posted this as a new question as it would likely be closed as a duplicate).
 A: The separation of spots in the diffraction pattern $y$ goes as:
$y \sim \frac{\lambda L}{d}$
where $\lambda$ is the wavelength of light, $L$ is the distance from the slits to the screen the spots are shone on, and $d$ is the size of the slit.
Clearly, the separation of the spots (and thus generally the precision that d can be measured with) increases with $\lambda$. Of course, this experiment is most easily performed with visible light, so along with the fact that red lasers are common and cheap, the end result is that this experiment is usually performed with a red laser.
Edit: As a partial answer to the extension, what is meant by resolution here is how precisely you can measure the slit width. If you use a 700nm laser, you can't do much better than 700nm on this precision: so if the slit is, say, 10 microns this could be a limiting factor if you need very high precision. So if this is your limiting case, you need to use a shorter wavelength light source: blue, ultraviolet or even X-ray light to get a very precise (though harder to measure) measurement.
A: I think this problem is more complicated than many people believe it to be and I think you have to carefully consider what actually limits your accuracy. Especially if you are doing undergraduate labs... I will try to give all the factors I could think of here, but don't have time to elaborate how to mathematically account for all of them.
If you are a researcher and use gratings for measurements you are probably going to make sure your setup is good enough that your limiting setup is the spectral resolution of the grating. What is meant by that is that the diffraction peak you use to measure wavelength has a certain width. As you change the wavelength the peak moves, but to distinguish two wavelengths, you have to move by at least the width (if your apparatus for measuring intensity is good you might be able to get away with moving a certain fraction of the width). I won't go into the details of the maths since you can find that in any standard optics textbook or in Chris' answer above.
Now if you are an undergraduate I highly doubt they are going to give you an apparatus where you can get anywhere near that limit. The error in the wavelength measurement is going to contribute, but will probably not dominate. This can also happen in certain other situations in real research.
One surprisingly large error in this measurement comes from the incoherence of the wavefront. Assuming you use a laser you should check that the one with the otherwise favorable wavelength doesn't happen to have a massively different beam divergence. This would contribute a phase factor at the grating that will influence your measurements. Same goes for the line width of the laser.
If you are using Fraunhofer approximation for your calculations (which the spectral resolution criterion assumes), you have to make sure that you don't get a significant error from not being in the Fraunhofer limit. Note that it is not sufficient to just check $\frac{W^2}{L \lambda} << 1$ (where L is the aperture distance, W is the slit width, and $\lambda$ is the wavelength). Instead one has to properly calculate the error contribution from the phase of the quadratic term. Especially in the lab this is not to be underestimated. The distances to get Fraunhofer limit are quite far. Also note the wavelength factor in the criterion for Fraunhofer limit. In fact this is also going to work in the same direction as the the spectral resolution factor.
My last point is going to be how the absolute intensity of the individual peaks change with wavelength. This is in fact the most important point (put last so that people keep reading). For your measurement you will want to use the highest order peak visible, since that one gives the best precision by the spectral resolution criterion. But for larger wavelength the intensity of these peaks falls off. It is non-trivial to find the actual factor (in fact scalar diffraction theory can't give a rigorous derivation, one might need to use electromagnetic simulations), but it goes something like $\frac{1}{\lambda}$ (which comes from the scalar diffraction integral).
I only gave qualitative pointers to the issues involved. The maths should hopefully be straightforward to work out (except for the last point). Please feel free to contact me if not.
A: To answer your specific question 
"I heard from someone that we should make the wavelength on the order of the desired resolution, I don't really understand how resolution comes into this as we are using monochromatic light. Can someone explain if and why this comment makes sense?"
In order to maintain Resolution for viewing things that are really small like molecules etc., you need a shorter wavelength of light. Or the way I prefer to think about it is with higher frequency photons. Synchrotron radiation will produce monochromatic light like X rays. The higher the frequency the higher the resolution. Or the shorter (Y) is in Chris's equation above.
