From the Super Mario Wiki
Super Mario series
Super Mario Sunshine
In Super Mario Sunshine, various Beehives can be found in Bianco Hills, Gelato Beach, and Pianta Village. If Mario gets too close to a Beehive or knocks one down, the Bees will swarm him, causing damage if he gets stung. Yoshi can eat these Bees for one Coin each. The last Bee to be eaten always gives up a Blue Coin or 1-Up Mushroom.
Super Mario Galaxy
Another species of Bees appears in Super Mario Galaxy. These Bees are different from the ones encountered in Super Mario Sunshine in that they are the same size as Mario, and are capable of conversing with him. These Bees are also friendly to Mario, and serve the Queen Bee. In addition, the Bee Mushroom makes its first appearance in this game, which allows Mario to transform into Bee Mario. In this form, Mario is able to flutter through the air for a brief period of time, and also stick to and climb Honeycomb Walls.
Super Mario Galaxy 2
Bees reappear in a few galaxies in Super Mario Galaxy 2, serving the same function that they did in Super Mario Galaxy. Occasionally, they will give the player helpful tips on how best to control Mario after he transforms into Bee Mario. After completing the "The Secret Wall Jump" mission in the Honeybloom Galaxy, a Bee appears onboard Starship Mario, and tells the player that they can flutter higher in the air if they collect coins while hovering as Bee Mario. When the Bee boards Starship Mario, Lubba says he is allergic to bees.
Bees appear in Yoshi's Story, where they fly around their Beehive, not letting Yoshi pass. Yoshi has to walk slowly to prevent the Bees from bothering him. Other larger Bees also appear in Yoshi's Story, as enemies that sting Yoshi if he gets too close.
Mario & Luigi series
Mario & Luigi: Bowser's Inside Story
Mario & Luigi: Dream Team
Bees reappear with Beehoss enemies in Mario & Luigi: Dream Team. They now have spikes on their head. Flibbees and Flibbee Rs are also bees that appear in the game.
Mario Party 10