In the past, I and many other riders have avoided coffee while cycling as being a calorie-free drink and a diuretic. A diuretic, of course, is a substance which reduces the amount of water your kidneys reclaim while cleaning your blood, moving water from your blood (and muscles) to your bladder. Since having a water shortage of a mere 2% of your body weight (or 1 litre per 110 lbs of body weight) can impair performance, I had stayed away from anything with caffeine or alcohol, which I know to be diuretics. However, staying away from caffeine is not necessarily a good idea.
One important point to note is that while exercising, the dehydrating effects of caffeine are almost unnoticeable. While at rest the story is much different, but an article published in Mountain Biker magazine said that something about exercise, without going into detail, largely prevents the diuretic effect.
Speaking of unnoticeable attributes of coffee, while most say that it gives an energy boost and greater awareness, I've sure never noticed. Maybe you have to be an old fogey to experience the effect.
The main effect of caffeine is to burn fat rather than your body's limited carbohydrate reserves. On average, only about 19% of your energy comes from fat; less when you're really exerting yourself. With caffeine in your system, however, enough fat is burned to provide 40% of the needed energy.
While this is clearly music to the ears of weight-watchers, this is useful to those who are keeping their weight stable for two reasons. The first in that your body has fat reserves in tho ballpark of 70,000 calories, but carbohydrate reserves only of 2000-3000 calories. When you're burning 500-1000 or more calories each hour on a hard ride, you can preserve your vital carbohydrate energy supply with caffeine. Secondly, fat-rich foods have far more energy per weight or volume than do carbohydrate or protein foods. As a result, you can supply the thousands and thousands of calories required on each day of touring with a smaller weight and bulk of food by eating more high-fat foods, but use the fat quickly enough to supply the energy for hard exertion.
Coffee is a good source of caffeine, even though black American coffee doesn't really have any calories. A mochaccino, cafe au lait, or espresso is probably a better idea, as the former contains whipped cream, and all have large amounts of steamed milk, giving them significant nutritional and energy value. Note that while espresso has about eight times the caffeine as greasy-diner coffee, the typical serving is about eight times less. Excedrin have about half as much caffeine as a single cup of coffee. Chocolate has lots of caffeine (and fat), but while some soft drinks have caffeine, stay away from anything carbonated while riding.