1. Don't be a jerk. Obvious? Don't ninja, ever. Don't play in a way that routinely gets you put on ignore lists. Don't beg. Don't make the game all about the gear-- either bragging about all the stuff you got, or whining about all the stuff you don't have. In short, to get into a good guild, you have to first be a good player. That said, it'll help you to...
2. Have the level and the gear, or at least know what you're aiming for. If you're trying to join a guild that's raiding MC, it'll help a lot if you've already got tons of fire resist. If you're wearing greens and trying to join a guild that's doing Naxx, you're barking up the wrong tree. Guilds are around to help-- the best gear in the game can't be gotten without them, and any good guild will help their members hit 60 and move beyond. But if you can't handle the heat (or frost), don't be surprised when they don't let you into the big kitchen.
3. No LFGs. I bet there's all kinds of evidence (and guildmasters) that will prove me wrong on this, but I'm standing by it: a guild you want to join won't be broadcasting a recruit in the LFG channel, or even in the GuildRecruiting channel. Your best bet is to know someone-- a rl friend or someone you've grouped with. Short of that, watch the players on your server (and guilds on GuildWatch, ahem), see who's good, and look them up on the web. If they've got a website and forums, they probably have an application form. The more hoops you can jump through to join, chances are the better off you'll be in the long run.
4. Take a trial run. Lots of guilds invite people on a trial basis-- either with recruiting runs or inviting them with a rank of "Initiate" or "Recruit." But feel free to join the guild on a trial basis as well, and see if they're compatible with you. Are there people of your level on when you are? Is the guild doing what you want to do-- if all you want to do is PVP, it won't help you much to join a guild that only runs PVE. Don't be afraid to /gquit if you don't think things are working out-- but see #1, too, and don't be a jerk about it. If you part ways amicably, there's a good chance they'll invite you back anyway when they are doing what you want to do.
5. Participate! Staying in a good guild means being a part of the group. When you sign up for raids, show up on time, repaired and ready to go. When guildies ask for help, help them. When they need items farmed from whereever you're headed, get it for them. Even if someone in the guild offers to pay me for something I'd put up on the AH for a few gold, I give it to them for free. The more you invest in a guild you like, especially when you're starting out with them, the more you'll get in return.
The one thing I've never done (in WoW anyway) is run my own guild. Any guild officers or GMs out there with more advice for players looking to join a good guild?