There are alot of posts about this and opinions vary. So a couple of guidelines I adhere to, both as a diver, and when I am DM'ing. These are for US-based dives. When you travel, there are differing expectations but how I rate the service doesn't change, but the amounts I tip do.
1. If all the crew does is take you to your site, make sure you safely get in and out of the water - they're doing their job and exactly what I'm paying for. I don't tip.
2. If the crew meets my needs, gets the gear on/off the boat, helps me setup my gear, provides great briefings and information about the dive to make it more enjoyable - it's worth $5 per tank. They're providing additional services that help me enjoy the dive more.
3. If the crew does #2, provides in-water tours, has snacks/water/juices available, interacts with us to make it more fun, rinses my gear after the dives - basically pampers me, it's worth at least $10 per tank. And I tip even more if they really customize what they do for me and do it for every diver.
Notice I said the "crew". Most operations split the tip money as it takes everyone working together to pull off 1st class dives. For example, if the DM's are in the water, you don't see the captain cutting up fruit or preparing the drinks for you while you dive. You don't see the 1-2 hours on either side of the dive prepping the boat, making sure all the supplies are loaded, etc..
There's also a common mis-belief that the divemaster's role is to show you everything and be in the water with you. Not the case. They're there for your safety. Everything they do above that makes them great divemasters. And for the folks that say "they're working and getting to have fun" - you're right. But there's a huge difference between working a dive and being on a dive. The work part is that you don't get to relax and you've got to be on your game the entire time. You're constantly assessing what can go wrong so you can respond to it. While I may enjoy doing the dive - I am at work.
So while divemastering is alot of fun (that's why I do it in addition to my day job), the tips if I've helped make a dive enjoyable and safe are definitely appreciated - mainly because it says job well done. Trust me, nobody's getting rich off of diving except maybe the dive shop owners!