Beta Keys are generally given out in many different ways. Promotions, Sign-ups, Contests, and third party groups.
Being a member of
TG is a good start, quite often guilds, clans, fansites, and communities are given a number of invitations.
Past Reputation with a developer or producer of a game can be influential in you being let in, but they look for those who actually produced some beneficial information for them, and usually not just once or twice but throughout.
The most people sign up on the game's official website. Depending on the game this particular signup is for stress testing the game, or having a close-to-launch number of people playing at one time to make sure the servers can handle the number. Not just exclusive to mmo's because server browsers may crash as well. The official website signup is more often than not simply for the stress test period which is usually at the very end of a beta or shortly prior to gold release.
The stress test period can serve an advertising purpose as well, because often any NDA you agreed to upon agreeing to participate has been lifted or lightened, Meaning people can talk about it at that point (as if they don't anyways). It just usually builds some excitement about the final product almost being ready to ship.
Check as many fansites or large general gaming sites for potential invites. (i.e. Fileplanet/gamespy or ign) these types of sites are often given exclusive privileges, as in a huge number of beta keys (usually given out in the form of contests or raffle-typed randomness), a short exclusive beta for only their members (though usually pretty polished at this point and only for publicity).
It may also help already having a game registered with the production company. I got plenty of chances to participate in the Tabula Rasa beta test which I declined because I was into other games, and didn't want it spoiled when it went gold. I got those because I had been a longstanding account holder with NCSoft which also managed the accounts for City of Heroes/Villains. Had played Lineage and Dungeon Runners for a period as well. They're constantly throwing beta invites for games they produce to their members.