To supply energy needs, hummingbirds drink nectar, a sweet liquid inside certain flowers. Like bees, they are able to assess the amount of sugar in the nectar they eat; they normally reject flower types that produce nectar that is less than 10% sugar and prefer those whose sugar content is higher. Nectar is a mixture of glucose, fructose, and sucrose, and is a poor source of nutrients, requiring hummingbirds to meet their nutritional needs by consuming insects.

For nutrition, hummingbirds eat a variety of insects, including mosquitoes, fruit flies, and gnats in flight or aphids on leaves and spiders in their webs. The lower beak of hummingbirds is flexible and can bend as much as 25 degrees when it widens at the base, making a larger surface for catching insects. Hummingbirds hover within insect swarms in a method called "hover-hawking" to facilitate feeding.

More Info: en.wikipedia.org