When an agent or Prisoners's current AP is greater than or equal to their Base AP, they can enable or disable sprinting during their turn at no cost. When sprint is enabled, they gain +3 AP (+4 if they have Speed 5), and when sprint is disabled, they lose the same number of AP. Note that this means that agents can spend up to 3 (or 4) AP while sprinting and still be able to toggle sprinting off (though they may not be able to toggle it back on after doing so).
When an agent moves while sprint is enabled, they make a noise that is heard from 5 tiles away from each tile that they step on along the way. Guards will come to investigate the last tile they heard a sound from.
Sprinting throughout an agent's entire turn is dangerous if there are human guards around, as they will come to investigate the location of the sound, which often results in them finding your agent. Given that danger, the most apparent use of sprinting is to move agents faster through areas of the facility that do not have any guards within earshot, and this is certainly a good use of sprinting.
However, the most powerful use of sprinting is to enable sprinting, move up to 3 (or 4) AP to create a sound distraction for human guards, and then disable sprinting for the rest of the turn and sneak to safety. This doesn't give the agent any net AP for the turn, but allows the player to manipulate guards to investigate the location where the agent initially sprinted, potentially distracting them from watching a more important location. This technique is known as sprint toggling.
Beware that agents that are encumbered or affected by Burst recovery at the beginning of their turn will not be able to sprint unless they get an AP boost from something like a Stim or augment. In addition, sprinting and sprint-toggling is very dangerous in Sankaku missions, as those facilities have several Sound Bugs that will detect the noise from sprinting.