It's a good question, but difficult to answer. For me, it's usually a case of having played similar guitars, through similar (or the same) amps, and knowing what they "should" sound like.
So, you get an idea of how a Tele should sound, a Strat, an SG, whatever - you might not have the best Tele, Strat or SG but you can tell from the acoustic tone if it's a real stinker.
I don't think the player comes into it much, unless you're making a decision on someone else's playing/equipment - I'm rubbish, but I'm consistently rubbish so I know how to get a certain kind of sound out of my own gear.
Then narrowing it down to the pickups, some things are easy to spot - if the amp overdrives far too easily at low volumes, the pickup's too powerful, it can't be due to anything else. If the treble's painfully piercing, or the bass strings sound mushy, those are things that usually can be fixed/improved by pickup choice.
It's never easy to get exactly the "right" pickup for a particular guitar, and I don't think you can turn a really bad guitar into a good one just by changing pickups. But over time you do get an idea of what pickups are likely to work in certain types of guitars.