Dietary rules and restrictions are a common part of many world religions. While they typically involve the avoidance of various forms of meat, in a few instances, coffee and tea do fall under religious restrictions.
Many of the religious concerns with coffee and tea have to do with consuming caffeine. Others are concerned with fasting or eating processed foods. Even if you don't adhere to any of these beliefs, it's interesting to learn about and it might help you avoid a social faux pas in the future.
The only time when coffee or tea is restricted for Muslims is during Ramadan, a month of spiritual fasting. From dawn until dusk, no food or drink is allowed, even water is forbidden. It's pretty clear-cut, with no gray areas.
Latter-Day Saints (Mormons)
The LDS restrictions involving coffee and tea are fairly well known, though many people may not really know the details behind it.
Coffee and tea are specifically prohibited, as written in the Word of Wisdom: "Hot drinks are not for the body or belly" (D&C 89:9). It has been interpreted by the Church that Joseph Smith was referring to coffee and tea with this statement, as they were the only hot drinks commonly available at the time (early 1833).
Some LDS members feel this is based on caffeine content so feel that all caffeine is to be avoided. Some feel that the rule should be taken at face value, and therefore it only refers to coffee and tea. The LDS church has no official position about caffeinated products other than coffee and tea.
There are no specific rules against either coffee or tea in Judaism, except for the broader rules of eating according to kosher standards. Both tea and coffee are kosher on their own, but there may be other considerations to remember when enjoying your cup.
One consideration is flavored coffee. Whether you are using flavored beans or adding syrups, you cannot be sure the kosher status of the many ingredients used to make these products. Many syrup manufacturers do offer kosher-certified products.
Another kosher issue can arise from decaffeinated coffee. Ethyl acetate is a chemical that is often used in the decaffeination process. One component of ethyl acetate is ethanol, which comes from grain. This would make coffee processed this way not kosher during Passover. There may be other aspects of coffee and tea that fall under kosher rules. There is also a concern during Yom Kippur and it's advised to kick any caffeine habit in order to make the fast a little easier, although the fast is only once a year, for 24 hours.
The Seventh-Day Adventists believe strongly in the importance of a healthy and wholesome diet, free from alcohol, narcotics, and other stimulants. Caffeine was once officially prohibited, but no longer. While not prohibited, it is still recommended that members avoid caffeine.
Like Seventh-Day Adventists, Rastafarians follow a pure and wholesome diet. This excludes coffee, alcohol, salt, tobacco, meat, and other processed foods. The foods eaten by Rastafarians (grains, fruits, vegetables) are all "ital" foods so coffee and caffeinated tea are prohibited.