What is the criteria for selecting a moderator in Stack Overflow?
If the community is mature enough (as on stackoverflow.com), moderators are selected through voting, as RSolberg answered. I would estimate the community needs to be 6-9 months old at least for this to work.
If the community is new (as on serverfault.com, and superuser.com), we need moderators to launch with, and so by necessity some moderators have to be hand selected by the "powers that be".
But as these communities grow, they will need more moderators, and voting will be the preferred method.
A while back, there was a nomination period followed up by a voting period. The SO team reviewed the nominations and chose the ones that would be voted on.
It was great that the community got to take on an active role in the decision.
You also gain access to some mod tools once your rep is at 10K... (not there yet though personally, so not too sure what I could do with that)