Birds have been building very intricate nests far before humans even came to this Earth. Actually, humans took shelter in caves and under cliff overhangs, where birds like swallows, martins, and swifts built nests using mud, saliva, feathers and other materials.
In ancient times
So how did humans start building nest boxes? As they started building structures, certain species like the House Sparrow, House Martin, Barn Swallow and Barn Owl took to human-built structures to build their nests. Perhaps humans also figured out that they could tempt birds like geese, ducks, turkeys, and pigeons to nest within or close to their buildings so that harvesting their eggs would be easy. This was also an important step towards domestication.
One example is the elaborate pigeon houses/towers, known as chabutros in Gujarat, and also found in different parts of the world. In some regions along the Himalayas, people made special provisions in their homes to encourage the nesting of swallows as they were considered harbingers of good luck and money. Similarly, in the Americas, colonisers documented a traditional practice of American Indians using crude boxes to encourage martins to nest there. This was due to the sheer number of insects that the martins caught. There are also records of nest box use in Sweden from 350 years ago.
The Industrial Revolution brought habitat loss, excessive use of pesticides, and pollution in its wake, resulting in dwindling bird numbers. People, especially in the rural hinterlands of the West, started experimenting with nest boxes to help species revive. Though not all efforts succeeded, birds that used cavities to nest like mynas, parakeets, owls, robins and sparrows stood a better chance. In one attempt to save the endangered Giant Hornbill, a huge nest box (40 cm in length and breadth and 80cm in height) was placed deep inside the forest at a 30m height. Unfortunately, it was not occupied. As bird studies advanced, box volume, form, hole size, placement, orientation, and material became species-specific and success rates increased. Nest boxes for hornbills too have been successful.
However, nest boxes can be quite a problem too. Often, some other species, not the one you want, occupy the nest box. Sometimes, squirrels use their teeth to make well-designed nest box holes larger to suit themselves, with the result that their population is increasing in urban areas at the expense of other species.
So, be cautious when playing host in keeping with our tradition of hospitality. Otherwise, you may add to the problems rather than solve them.