I bet your answer to this question is; by giving a good tip. So what do you do if the service was bad? Here I predict two different answers, either you don't give a tip or you complain to the management of the restaurant. If don't tip I bet you leave the restaurant with a bad feeling about your visit. Also the waiter might not know that you were unhappy with the service and think you're just another cheap tourist with no manners. By complaining to management however you typically get a better experience since the restaurant will try to compensate in various ways. This leaves you with a good impression of the restaurant and the waiter knows what he did wrong and can correct the behavior. So in my opinion, talking to management or maybe even the waiter immediately is the best way to handle a bad experience. And by talking to management you also make sure the management knows one of the employees did something wrong. I'm sure they want to know.
But what about really good service? By giving a great tip you make the waiter happy but that's it. And you're not really enforcing specific good behaviors. And maybe even worse; management doesn't know that the waiter did a great job. Why not consider talking to management when you have a really good experience? I'll bet the waiter will be happy even though they'll probably wonder when you ask to speak with the manager. So if you want to be real nice you should probably tell the waiter that you want to talk to the manager and explain what a good job they've done.
And don't stop at restaurant visits. If somebody you work with do something great you should tell their boss too. I'll bet they both want the boss to know when the employee does something good. Don't just strike down on bad behaviors, enforce good behaviors too!