A quick Google search turned up this:
Coffee is only a mild laxative, it’s a much stronger diuretic. There’s one chemical that causes this: caffeine. When caffeine is metabolized it produces three chemicals; paraxanthine, theobromine, and theophylline. These are the ones that cause the sweet sweet effects of caffeine. Theophylline is the smooth muscle relaxor, and since your bowels are smooth muscles, there you go! There’s not much theophylline in caffeine compared to the other compounds, so it’s not a very strong laxative feeling. Coffee drinkers feel it more, since they do tend to take in more caffeine than tea drinkers, although if you put back enough black tea, you’ll see the effect just as well. Like most chemicals, your tolerance for theophylline increases the more caffeine you metabolize.