Because bees are typically busy collecting pollen and sipping nectar in your garden during the day, it might be unsettling to see them buzzing around your outdoor lights at night. Some bees forage at night, when there is less competition for food. If you see bees near your porch lights at night now but haven't in the past, then the bee activity could be a sign of a more disturbing problem -- parasitic flies.
If bees fly around your porch lights at night and you notice several dead bees nearby the next day, they are likely honeybees or bumble bees that were parasitized by the Apocephalus borealis fly. This tiny, native, humpbacked fly lays an egg directly into the bee. When the egg hatches, the larva, or maggot, eats the bee from the inside out. The infested bee, for unknown reasons, abandons its hive at night then soon dies. Bees are important pollinators in gardens and farms, and parasitic flies are a serious threat to bee populations, particularly on the U.S. West Coast where the phenomenon was first noticed. Collect some of the dead bees in a plastic bag. The presence of maggots or pupae in the bag after one or two days will confirm a parasite problem.
If a bright light, such as a porch light, is in the direct sight line of an Africanized honeybee colony, the bees will fly at that light repeatedly and sometimes die beneath it. Africanized honeybees (Apis mellifera) are hybrids of European and African honeybees. They swarm up to 15 times per year to establish new colonies while the European bee species swarm only once annually, in late spring. If you live in southern or southwestern states, inspect your property for bees entering small, pencil-size holes in structures close to outdoor lights. Africanized honeybees form colonies easily in tree cavities, houses, sheds and garages. Do not attempt to remove the colony because Africanized honeybees are particularly territorial and protective. Call an exterminator with experience in removing the insects.
Some sweat bee species (Halictidae) feed exclusively on night-blooming flowers at dusk or dawn, or on moonlit nights. Most of these small bees are dark-colored, and some species are metallic green or purple. Porch lights can persuade bees from their nest. A study led by scientist Almut Kelber and presented in a 2006 "Behavioral Ecology" article showed that artificial lights caused Halictidae bees to leave their nests earlier than dawn, when they would normally begin to forage. Mining bees (Andrenidae), yellow-faced bees (Colletidae) and carpenter, digger and bumble bees and honeybees (Apidae), all include species with some nocturnal behavior.
When a flying insect circles your porch lights, it can be difficult to identify. Several insects that look like bees may be something else entirely. European hornets (Vespa crabro) are 1-inch-long wasps with reddish-brown heads and yellow stripes on their lower abdomens. They often seek out artificial lights. Some wasp species from the Ichneumonidae family, particularly the large, brown netelia wasp (Netelia spp.), regularly fly around porch lights. Use caution with both of those beelike creatures because they have painful stings.