Generally, you should not tip your waiter only when your are extremely unhappy with the service. Though the standard is to tip 15% of the total bill for good service at lunch and 20% of the total bill for good service at dinner, these are highly subjective. In other words, your tip should depend on what you think is appropriate, not what the social standards may be.
Sometimes, restaurants may offer exceptional service and the servers should be rewarded accordingly. If a server goes out of the way to correct an issue, or provides exemplary service in other ways, a 20% tip may balloon even higher, depending on your tipping style.
In some cases, to really send a message, it may be good to leave some sort of tip, even if you're tempted not to leave one at all. Those who decide to not tip may be sending a mixed signal in some ways. For example, many restaurants allow tips to be left on a credit card, and the waiter may not see your tip until the end of the night, long after you've left and he's forgotten about you. In other cases, if you decide to not tip your waiter, he may think it was simply an oversight.
To truly send a message that is understood nearly universally by waiters, leaving a small tip, such as 1 US penny, if in the United States, is a good way to express your displeasure with the service. This sends the unmistakable signal that, yes, you meant to tip, but a tip of any substantial value was not warranted.
For those who really want to offer some constructive criticism, leaving your reasons for not tipping could be a good idea. In this way, even if you decide to not tip your waiter with money, you can leave service tips in a very literal way. Of course, this may be redundant, and in most cases, the waiter will know where things went wrong. It may be his or her fault, and he or she was having an off day, or it may be the fault of the kitchen.
In general, if there is a problem with the service and you cannot figure out who is responsible, it is always good to ask what the problem is. It may be the kitchen, the server, or something beyond anyone's control. Determining what the problem is before deciding on your tip is always a good idea. That way, you make sure the wrong person is not punished.