It turns out that bees like a buzz. They are attracted to flowers that give them a bit of caffeine along with the nectar. The flowers of plants such as coffee and citrus have nectar laced with tiny hits of substances like caffeine and nicotine.
A Honey Bee on Linden (Lime) tree flowers.
For it to be beneficial to the plants they have to give the bees just the right amount -- enough to give them a buzz, but not enough to give them the jitters. The levels are about one thirtieth of the levels in instant coffee. Flowers with this low level of caffeine are significantly more popular with bees than those with none or those with high levels.
Violet Carpenter Bee on Pigface (Hottentot Fig) flowers.
Experiments show that bees fed a little bit of caffeine learn more quickly and have longer memories, so the caffeine is giving them a foraging advantage. The plants of course benefit by being more attractive to the bees, therefore increasing their chances of pollination.