It’s a question that has been asked for years: Is a dishwasher or washing dishes greener? Which uses less energy and water? When TreeHugger looked at the question a few years ago, the consensus was that the dishwasher was better, but that a very careful hand-washer could probably use about the same amount of water and less energy drying. But much has changed since then. The dishwasher is an example of when enlightened regulation combined with good design has made the dishwasher significantly better over the years, to the point where there's no longer a question.
Since 2013, all dishwashers have had to use less than five gallons of water on a full cycle; Energy Star dishwashers are even better, using 4.25 gallons maximum and less than 295 hWh/year in average usage, which they consider 215 cycles per year.
People often pre-rinse dishes, which uses a lot of water on top of what the dishwasher is using, skewing the numbers in favor of the sink. However you don’t really have to do that anymore — the dishwashers are good enough that you can just scrape off the food and let the machine do the rest. The machines even have soil detectors to ensure that they get it all. The American Council for an Energy-Efficient Economy notes:
Studies are showing more and more that, when used to maximize energy-saving features, modern dishwashers can outperform all but the most frugal hand washers. <
There are some bells and whistles that make dishwashers even more efficient. They have pre-heaters that boost the water temperature up to 140 degrees Fahrenheit to sanitize them, which lets you turn down the temperature of your household water heater to 120 degrees (although some don't think this is a good idea). They also have timers that let you set it to turn on at a later time when the power rates are lower, and they often have no-heat air dry cycles, although some complain that this causes spotting.
On the other hand, none of the studies do a life-cycle analysis of what it takes in terms of energy and water to actually build the dishwasher and replace it every 10 years or so. Nor does it take into account a Swedish study that found that children in families that wash dishes by hand have significantly lower rates of eczema and are less likely to develop hay fever or asthma, probably due to the "hygiene hypothesis" — the dishes are dirtier and the kids are exposed do more bacteria and other microorganisms, strengthening their immune systems.
However in the end, there appears to be a consensus that dishwashers today do a better job using a lot less water and energy than a person doing dishes by hand. It’s one labor-saving appliance that does a better job than you can.