As a rule of thumb, humbuckers can sit as close as you want for the volume you want. To begin, fret the top and bottom E strings at the final fret. Using a steel rule, adjust the humbucker’s height until its treble and bass sides both sit evenly 2.5mm beneath the fretted strings.
Strats should be adjusted to sit with the treble side slightly higher than the bass for a good tonal balance. Fret the two outer strings at the final fret, then adjust the pickups so the polepiece tops sit 2.5mm and 3.5mm from the treble and bass E strings respectively.
Watch out for wolf notes – these occur when the pickup’s magnetic field is too close to the string’s field of movement, preventing it from vibrating naturally. Step away from the strings, sir!
Strings vibrate more freely near the neck than they do at the bridge, meaning neck pickups sound louder for a given height – so a little experimentation with relative height settings may be necessary to establish a good balance in volume between pairs or trios of pickups.