Around here it would not be considered a good investment simply because there is so much competition already. I have seen many come and go in a relatively short time, and they are turning to gimmicks like Bikini Baristas to attract more customers.
The problem with coffee shops is that they are very dependent on the state of the economy. Once the economy starts to falter a little, it's easy for people to switch from getting coffee and a nice mom and pop coffee place and switch to getting a cup for 99 cents at a local McDonalds or Dunkin Donuts
I've been doing a business plan on a coffee roasting business, and in doing some of the research I've bumped into a number of papers and other data concerning coffee shops, and I can assure you they ARE pretty high margin. In fact it has me really tempted to open a coffee shop in addition to a roasting business, but part of that is because here in Ontario a roast-only business needs an environmental permit due to the emissions of roasting coffee, but a coffee shop who roasts on site does not need a permit.
But as others have mentioned, do your homework about competition already in the area. And high-end coffee shops have the best margins, but they are also easy to fall in a bad economy.
I have to counter bisjoe's point about competition. A blanket statement saying that there is too much competition doesn't really help the original poster. If you have 100 Tim Hortens or Dunken Donuts in your town but only one specialty coffee shop then there is hardly any competition if you wish to open a small specialty coffee shop. The competition drops even more when you begin to roast your own coffee as it opens the door for not only walk in retail sales, but allows for custom branding of your product that other businesses such as restaurants can use as their own "house brand" of coffee.
While I don't own a coffee shop, I do have a background both in large and small businesses and my MBA (not trying to say i'm better, just justifying my side of the argument)