It's not surprising that for those who are afraid of being stung by a bee, the obvious question is:
"Will bees sting for no reason?"
In short, the answer is: I'm not aware of this happening. Stinging tends to occur when bees feel threatened in some way.
Bees sting for the purpose of self defence or defence of the colony from predators.
An example of this would be a colony under attack from other invertebrate predators, such as wasps or hornets.
I am also aware of bees defending their nest or colony from larger threats, such as birds.
However, they do not sting without reason. As an example, even though wasps can behave as predators, bees will often be seen foraging close to wasps, with neither insect attacking the other with intent to sting.
Some species, such as large carpenter bees, behave in a territorial way, but it's the non-stinging males that are likely to fly close as it investigates for signs of threat. Despite its size, it's harmless.
Read more about this topic on Why do bees follow me?
It's difficult to tell whether a bee is about to sting you (though you could hazard a guess if you hear them buzzing loudly and angrily should you disturb or harm them!).
However, if stationery, a bee may tilt its body to one side slightly, and raise its middle leg in the air - this is quite commonly seen in bumble bees that are disturbed. It's a defensive reaction to threat.
In the interests of not being stung, and not causing unnecessary stress for the bee, it is best to leave the bee alone.
If you are concerned about bee stings:
The vast majority of people will get over a bee sting - see my page about treating bee stings. If you have a severe allergy to stings, you should see your doctor about acquiring an Epi-pen.
The chances of death from bee sting are very remote indeed - it's a very tiny number. In the USA, more people are killed by lightning strike every year than die through bee sting! You can read more about this on my page about bee sting facts.
It's also worth remembering that male bees cannot sting, and solitary bees rarely do. Bumble bees and honey bees sting only if provoked.
Pain
The most painful bee sting recorded is from a tropical species, the giant Bornean carpenter bee. And yet, on the Schmidt Pain Index scale, it only manages to score in the mid range where pain is concerned1.
It is not that honey bees are habitually aggressive, it is merely the fact that such close proximity to the bees in such a situation could provoke a stinging incident.
Beekeepers wear protective clothing (such as a suit) in order to deal with a mass of honey bees inside hives (or indeed a swarm of honey bees).
In such circumstances, direct interference with the hive could be perceived as threatening for the bees, and provoke stings. After all, bees are understandably protective of their food stores, eggs and larvae. It's therefore sensible for beekeepers to protect their bodies with a suit, and their faces with a hat with a veil.
Beekeepers may also take other practical steps to avoid stings.
Read my page about fear of bees: apiphobia.
1. Schmidt JO. Pain and Lethality Induced by Insect Stings: An Exploratory and Correlational Study. Toxins (Basel). 2019;11(7):427. Published 2019 Jul 21.