It will associate the label with the form field. This is especially useful for radio buttons, so you can click on the label to select a button, not just the smallest button.
However, for this you do not need to use the for attribute, you can also put a switch in the label:
<label> <input type="radio" name="selection" value="yes" /> Certainly </label>
I usually put a span tag around the text so that it can be easily styled using CSS.
source share