Sometimes quite a bit, sometimes not as much. Depends on what the pickup is.
Most Strat pickups use magnets for pole pieces. If you have them too close to the strings, it can cause unnatural overtones and dampen sustain.
For humbuckers, usually just about anything that it not causing the strings to hit the pickups is OK. Higher is louder, but not necessarily better sounding. Lowering them can change the balance of bass/mids/treble. Some pickups are much more sensitive to height than others, especially lower output pickups in my experience.
Maybe more important is getting the bass side to be close to the treble side so that all the strings are as close in volume as possible, but this can also be a matter of taste.
Some may disagree, but I've always started with adjusting the bridge pickup to where I think it sounds best height-wise, ensuring that it's balanced across the strings, then adjusting the neck pickup to where I like the balance with the bridge. I typically like less output from the neck, some don't. Some say adjust the neck first, then get the bridge to match.
Another thing to try is adjusting the pole pieces. The idea was to be able to adjust the output of each string, but it can also change the sound in the same type of way that raising or lowering the pickup itself can, just for each string. I've found that I can really dial in the last little bit by raising or lowering the pole pieces.