Detents, sometimes referred to as "click-stops", represent positions on a dial at which movement is locked. Detents are a welcome addition to manual lenses where the f-stop markings can be vague in relation to the indicator on the dial.
Without click-stops to set your aperture, slight variations in dial position can represent as much as a 1/2-stop variance in exposure on either side of the marking, allowing for situations where a given exposure setting could differ by one full stop.
Another benefit of detents is that they prevent slight incidental movements from changing your settings. For instance, a lens without click-stops might, when set down on a seat, catch some incidental friction with the material it is set on, enough to alter the exposure - perhaps even significantly.