I don't have any fancy scientific studies, but it's my intuition coffee probably isn't good for you. Coffee beans were not meant to be drunk. Tea is much more natural.
First, don't fall into the fallacy of natural = good. It doesn't always.
Second, while not nearly as good for you as tea, coffee has some health benefits. As mentioned, its a great cleanser/laxative. It can also improve short term memory, give a boost of temporary energy and reduce the risk of certain diseases (Parkinson's, gout, and Alzheimer's are the ones I remember reading about, there may be more). Coffee has been documented as a drink in the middle east going back to the 1400s, I believe (I may be off on the century, but give or take 100 years). All in moderation of course. Too much coffee and the caffeine can really put a strain on your heart.
Coffee does hurt my stomach when I drink it. Shame, as I really do enjoy it. I find that drinking it without milk makes my stomach hurt less. I tend to prefer tea (with some honey, mmmm).