Okay, a lot of good points here, but one thing hasn't been mentioned, and it's one of the most important things to do: Communicate! Here's what I mean:
People have repeatedly said that tipping is supposed to reflect your satisfaction with the service. But servers won't necessarily know why you tipped well or poorly, because some people are stingy, and some are generous (we've seen some of both in these answers). If the waitress gets a 20% tip, is that because she did a good job, or just because the guy was taking a girl on a date and wanted to impress her?
So here's what I do. If I get decent service, I'll tip 10-15%. (15% is standard, but for service that had nothing particularly good about it, I don't feel bad tipping only 10%.) If I felt that the server did something I disliked, and it was their fault - bringing the check really soon, even though it isn't crowded, for example - I'll tip below 10%. Then I'll write a polite, friendly note and leave it in the check with my tip. "Thanks for the service. I'd appreciate it next time if you would wait for us to ask for the check before bringing it."
Of course, if the server does something really well, the same applies. I'll tip above 20%, and leave a note thanking them for doing whatever it was.
Y'see, people say money talks, and maybe it does. But it sure doesn't speak very clearly. If you leave a small tip, the waitress might just think you're cheap, and next time you come, there's no way you'll get good service. If you leave a polite note, though, there's a possibility you'll get an improvement next time. And you definitely will if you leave a good tip with a note thanking them for something good.
One last suggestion: If you plan on being a regular customer, you should probably tip a little better than you would otherwise, because it'll get you better service when they recognize you. And DEFINITELY be good about leaving friendly notes in this case.