When doing lab experiments, the more data you have, the more accurate your results will be. Often when scientists are trying to measure something, they will repeat an experiment over and over in order to improve their results. In the case of light, using a diffraction grating is like using a whole bunch of double slits all at once.
That's the short answer. For the long answer, lets discuss how the experiment works.
The double slit experiment works by shooting parallel light rays from the same source, commonly a laser, at a pair of parallel openings in order to cause interference.
Double slit experiment
The idea is that as the light hits the slits, it is in the same phase, so you can consider each slit to be the source of the same light. When the light hits a wall, depending on what phase each beam is in they will interfere either constructively, providing maxima, or destructively, providing minima. These interference patterns are seen as a series of bright and dark lines. Here is a more in depth explanation of how the experiment works.
Double slit interference pattern
Using a diffraction grating provides more slits, which increases the interference between the beams.
Diffraction grating experiment
By using more slits, you get more destructive interference. The maxima on the other hand become much brighter because of increased constructive interference. This effectively increases the resolution of the experiment, making it easier to measure the distance between consecutive maxima.