For an open string, the fundamental is strongest in amplitude at the mid-point of the string, or the twelfth fret. For the first harmonic (an octave higher), the strongest point is at half this distance, or halfway between the twelfth fret and the bridge, or at the 24th fret. Higher harmonics simply divide this string length into more and more equally-sized waves.
Man, I'm lousy at explaining this. Look at Wikipedia's page here:
http://en.wikipedia.org/wiki/Vibrating_string
The first image on the page illustrates what I'm getting at.
Anyway, you can tell that the closer the pickup is to the extreme end of this string, the more it will sense the higher-order harmonics relative to the fundamental, and the "brighter" it will sound.
This is all complicated the moment you fret the string. The theory is the same, but then the effective length of the string has changed, and the frequencies of the standing waves become higher. In other words, the illustration becomes "squished" from left to right. So the pickup would ideally have to be moved a tiny bit closer to the bridge to sense the higher harmonics in exactly the same way.
Of course, this is impractical, so pickups have been designed with an aperture, or an "opening" through which they sense string vibration. A narrow pickup (like a J) will have a narrow aperture, perhaps an inch, while a wider pickup (like a MM) will have a wider aperture, maybe a couple of inches. This compensates for the slightly different points along the string for which the various fretted note overtones are prominent.
This also explains why pickups placed nearer to the neck sound "fatter" - they pick up a higher proportion of the fundamental and lower harmonics.
Sorry for my early-morning layman explanation, but hope this helps.