If you're doing a full blown rehab and changing out the cabinets then absolutely yes, put a dishwasher in. If you don't, there's a good possibility that many potential buyers won't like the house just because of that, and you'll be unlikely to know the real reason behind why you're not getting offers. The kitchen is where everyone congregates, when an agent is done showing the house they'll stand around in the kitchen and talk about things.
Note - The Kitchen Sneak Attack: because people naturally gather in the kitchen I recommend putting a bowl of candy on the counter. Consumption of sugar releases endorphins into the brain which creates pleasurable feelings. Make people happy when they're in your house!
Depending on whether you'll be using white, black, or stainless appliances and what kind of cabinets, you can actually buy a dishwasher for cheaper than the cabinet that would take its place (especially if you buy it on craigslist).
I bought a hardly used, 1 year old, black dishwasher on craigslist a few months back for $100. I think the 24" cabinets I buy (off the shelf home depot) are easily $50+ more. Considering it's probably a little more for installation in comparison with the cabinet, run a water line, route the drain line, it probably works out to about the same price if you shop around.