Worker honey bees will sting to defend their hive. Honey bee venom is a cocktail of chemical agents with many pharmacological effects. Much of the pain from a sting may be due to melittin, a polypeptide that comprises 40-60% of the dry weight of honey bee venom. Humans are blessed with nociceptors, nervous system receptors that when activated cause a sensation of pain. Some nociceptors, for example, respond to temperature and warn us if our skin is being damaged by heat.
Melittin has the ability to interact with pain receptors and activate them. Melittin also has the ability to form pores in membranes. Inflammatory agents from the tissues can be released through these pores, a second source of pain and discomfort. Melittin pores, if formed in the membranes of nociceptors can alter ion flows that activate the receptors and send pain signals to the brain. Melittin can also stimulate the production of receptor channels in nociceptors which increases the signaling activity of the pain receptors. Injection of melittin by a bee has several physiological effects all of which can increase the sensation of pain.
Jun Chen, Su-Min Guan, Wei Sun & Han Fu. Melittin, the Major Pain-Producing Substance of Bee Venom. Neurosci. Bull. June, 2016, 32(3):265–272.