Most people find that microphones capture the sound of their guitar more realistically than pickups, but pickups can be effective in some recording situations. If you simply can’t create a quiet environment for recording, pickups may be your only choice. Using a pickup can make it easier to record guitar and vocals, or even another instrument, at the same time without worrying about a mic picking up other sounds on the guitar track.
Some contemporary guitarists blend a pickup with mics to get a more direct and larger-than-life sound. As long as you have an extra input for the pickup, you can always record multiple tracks using mics and a pickup and then experiment with blending the tracks.
Soundboard transducers (such as K&K’s Pure Western Mini or the L.R. Baggs iBeam) often sound quite realistic on recordings, and undersaddle pickups (such as the D-TAR WaveLength, Fishman Matrix Infinity, or L.R. Baggs Element) can add a punchy sound to a recording. Magnetic pickups tend to sound a bit electric but can add a deep bass when blended with a microphone.
Another option is to use a processor like the Fishman Aura, which can make an undersaddle pickup sound more like a microphone. And of course, internal microphones like the L.R. Baggs Lyric or the various Miniflex models may also help eliminate some external noises.