First, Felipe, please don't post a "void" like that. I know it seems redundant, but even though your question is in the subject you should put it in the message as well. Just good forum etiquette. :-) Thanks . . . (I'm not a Mod, and I don't pretend to be, just giving advice. :-) )
Anyway, to answer your question, they should be as close as they need to be to sound good to your ears, but not so close that the magnetic field chokes the strings.
Closer is generally louder, sometimes with more “balls” depending on the pickup, while farther away is softer, but with a smoother sound, again depending on the pickup.
Also you'll usually need to have them a little farther down on the
wound strings due to the fact that they are generally louder than the plain ones, this is to keep the volume across all six even.
I personally prefer my Evo's at about 2 mm on the high E string and about 2.2 to 2.4 on the low E, but I don't usually measure, I just listen and whatever sounds good is what I'm happy with.
Single coils have to be a little farther away, they have a greater pull on the strings and if set too close will cause a “warbling” sound to the strings and will shorten sustain.
Also remember if you're measuring the distance to press the strings down at the highest fret, or you'll be WAY to close. :-)
Mic