More than anything else, birds eat insects, in fact nearly every bird species will at some point in the year consume insects. For birds like Warblers, Vireos, and Flycatchers insects are eaten year-round, which helps explain why these birds migrate in the fall when insects become scarcer in North America. Most other species of bird will include insects in their diet as well, especially during breeding season when baby birds require quality protein sources. Creating a habitat that promotes insect activity is probably the best overall way to attract birds. And while insects can become pests, keep in mind that birds and even insects themselves act as natural insecticides.
A general rule for promoting diverse wildlife (birds and insects included) is to grow native plant species, which have co-evolved with insects to provide them with the specific nutrients they need for survival. Adding native plants to your property guarantees insect habitation, which greatly enhances your chances of attracting birds. For more on native plants and their relationship with insects and birds see: Attracting Birds with Native Plants.
Similar to preferences for bird seed, different species of birds have different preferences when it comes to insect types. The following categories provide a general exploration into which species of bird eats which species of insect, and what can be done to promote habitation of those insects.
Tree-Dwelling Insects (insects that primarily live in trees and or eat leaf foliage) are consumed by Canopy Birds (birds that forage in foliage of trees) and Woodpeckers (birds that take insects from tree bark)
Tree Dwelling Insects: Aphids, Beetles, Borers, Caterpillars, Larvae, Scales, Spiders (though not technically an insect)
Birds Attracted to Tree-Dwelling Insects: Baltimore Oriole, Black-Capped Chickadee, Blue Jay, Downy Woodpecker, Kinglets, Northern Flicker, Pileated Woodpecker, Red-Bellied Woodpecker, Red-Eyed Vireo, Rose-Breasted Grosbeak, Scarlet Tanager, Tufted Titmouse, Warblers, White-Breasted Nuthatch, Yellow-Bellied Sapsucker
Plants that Promote Tree-Dwelling Insect Habitation: American Basswood, American Elderberry, American Holly, Ash, Aspen, Arrowwood, Beech, Birch, Black Willow, Crabapple, Dead Trees, Eastern Red Cedar, Elm, Flowering Dogwood, Hackberry, Hawthorn, Hickory, Oak, Maple, Red Mulberry, Serviceberry, Sassafras, Spicebush, Tulip-Poplar, Wild Cherry, Wild Grape
Ground-Dwelling Insects (insects that primarily live on or near the ground) are consumed by Ground Foraging Birds (birds that forage on the ground)
Ground Dwelling Insects: Ants, Beetles, Bees, Butterflies, Caterpillars, Crickets, Earthworm (though not technically an insect), Flies, Grasshoppers, Moths, Spiders (though not technically an insect), Wasps
Birds Attracted to Ground-Dwelling Insects: American Robin, Brown Thrasher, Dark-Eyed Junco, Eastern Bluebird, Eastern Phoebe, Eastern Towhee, Gray Catbird, Indigo Bunting, Northern Cardinal, Northern Flicker, Northern Mockingbird, Purple Finch, Ruby-Throated Hummingbird, Veery
Plants that Promote Ground-Dwelling Insect Habitation: American Boneset, Black-Eyed Susan, Blazing Star, Blue Wild Indigo, Dead Trees, Goldenrod, Great Blue Lobelia, Joe Pye Weed, Marsh Marigold, Milkweed, Mountain Mint, New England Aster, Purple Coneflower, Red Columbine, Sunflower, Trumpet Honeysuckle, Wild Blackberry. Also: water, leaf litter, and mud.
Flying Insects (Insects that spend most of their time flying in the air) are consumed by Fly-Catching Birds (Birds that catch insects in midair)
Flying Insects: Bees, Butterflies, Flies, Dragonflies, Mosquitoes, Moths, Wasps
Birds Attracted to Flying Insects: Blue-Gray Gnatcatcher, Cedar Waxwing, Eastern Bluebird, Eastern Phoebe, Kinglets, Warblers
Plants that Promote Flying Insect Habitation: American Boneset, Bee Balm, Black Eyed Susan, Blazing Star, Cardinal Flower, Field Thistle, Goldenrod, Great Blue Lobelia, Milkweed, Mountain Mint, New England Aster, Purple Coneflower, Trumpet Creeper, Wild Blackberry, Wild Blueberry, Wild Grape. Also: standing water.