Caterpillars are a favourite food for many birds, especially their growing chicks. Stake out an active nest of a songbird and monitor the foods the adults bring to the nest. Caterpillars usually top the list.
Besides being packed with carbohydrates, proteins and fats, caterpillars are rich in the yellow carotenoid lutein. And birds need this lutein to colour their feathers yellow. They are not able to synthesise carotenioid pigments and thus have to get these pigments from food.
Leutin is found in green leaves. However birds do not normally eat leaves. But caterpillars do. Thus eating caterpillars that eat leaves provide birds with all the leutin they need for their feathers. Leutin deficient birds will have a diminished yellowness in their plumage.
Other foods like colourful fruits, seeds and many insects contain carotenoids that are responsible for the red and orange colours in birds.