From http://www.grandtimes.com/Backyard.html, which also provides solutions for other insects,
One way to reduce the population of wasps, hornets and bees around bird feeders is to trap them. Wasp traps, easily obtainable in stores, are plastic, globe-shaped, covered reservoirs that can be baited with sugar water, meat or fish scraps and hung near the bird feeders to lure the stinging insects inside. Once in, they are unable to find their way out. Dozens may been caught in a single day.
“Wasps were pests at my hummingbird feeders, but I solved the problem with cooking oil,” Betty Rochester of Pine Bluff, Arkansas, wrote in Birds & Blooms. “Each time I clean out my feeder, I dip my finger in oil and rub it around the feeding ports. It works,” Betty assured. “My feeders have been wasp-free for four years.”
Another way to discourage bees and other stinging insects from sugar-water feeders is to mount bee guards on the feeder ports. On hummingbird feeders, bee guards are small, round, plastic grates that slip over the feeding tube, restricting the insects’ access but allowing the hummers to feed through the grates with their long bills and tongues.