Bees have a random chance of stinging no matter how happy they are or regardless of whether you smoke them. Happy/clean bees will have a much lower chance of stinging. Smoking the hive will reduce the chance of stinging even more.
Each bee hive has three happiness levels, Angry, Content, and Happy. The game keeps a hidden score of their mood in a range between 1 and 100. Anything below 30, and they're Angry. Between that and 65, they're Content. Above 65, and they're Happy. When you first buy and place the hive, the score starts at 50. Bees are made happy by cleaning the hive and feeding them. When the hive is both fed AND clean, it adds to the happiness score by 1.5 points per hour. If the hive is dirty, you lose 1.5 per hour, and the same 1.5 with being hungry, so that you'll lose 3 happiness per hour if bees are both hungry and dirty. Hunger and cleanliness both have their own 1-100 values. Hunger decays at 4 per hour, and cleanliness decays at 2 per hour.
The hive produces honey, which can eaten directly or be used in cooking and is an alchemy ingredient. The quality of the honey produced is based on the bees' happiness score:
12.5 - Foul
25 - Bad
37.5 - Normal
50 - Nice
62.5 - Very Nice
75 - Great
82.5 - Excellent
90 - Outstanding
97 - Perfect
They produce one bottle of honey per 12 hours, and store up to 5 bottles' worth (or 2.5 days worth) at a time.
In short. Feed and Clean your bees 2-3 times a day. Collect honey once every couple of days, and like me you will never have your honey/beeswax quality drop below perfect/outstanding quality. Just remember that the Hunger/cleanliness of the bees decays faster than it raises, so if you neglect them for even 1 day you will end up with foul/bad honey/beeswax again.