Answer
$500\;\rm nm$
Work Step by Step
We know, in diffraction gratings, that
$$d\sin\theta_m=m\lambda$$
Hence, the light’s wavelength is given by
$$\lambda=\dfrac{d\sin\theta_m}{m}$$
Plugging the known;
$$\lambda=\dfrac{\frac{1\times 10^{-3}}{500}\cdot \sin30^\circ}{m}$$
$$\lambda=\dfrac{1\times10^{-6} }{m}=\dfrac{1000\;\rm nm}{m}$$
We need to find the visible light which is between 400 nm to 700 nm.
At $m=1$;
$$\lambda =\dfrac{1000\;\rm nm}{1}=1000\;\rm nm$$
which is not in the range of the visible light.
At $m=2$;
$$\lambda =\dfrac{1000\;\rm nm}{2}=\color{red}{\bf 500}\;\rm nm$$
This is a visible light.
At $m=3$;
$$\lambda =\dfrac{1000\;\rm nm}{3}= {\bf 333}\;\rm nm$$
which is not in the range of the visible light.
moving forward will give us less wavelengths. So that the right answer here is 500 nm only.