Unfortunately, their reputation as mosquito predators is over-rated.
Mosquitoes have a number of natural enemies, some more useful than others to control them around human habitations. Some of the ones that you actually see out catching bugs are the least useful, specifically, when it comes to mosquitoes. Maybe purple martins and bats won't eat anything, but their choice of bugs is large enough that mosquitoes make up only a small part of their diet.
Purple martins have gained a reputation as natural mosquito predators, and they do eat adult mosquitoes, but they eat most other kinds of flying bugs, too. No research has shown that mosquitoes are more than 3 percent of their diet, according to an article in Missouri Conservationist magazine.  The results seem logical, since martins catch insects during the day while flying high in the sky, but mosquitoes usually fly close to the ground looking for prey to bite, and are most active after dark. Claims that these birds can eat 2000 mosquitoes a day are based on a hypothetical diet eating nothing but mosquitoes--something that no purple martin actually does. 
Purple martins are still good to have living nearby, since they eat lots of other insects that humans don't want around, including garden pests like cucumber beetles and Japanese beetles. Unfortunately, they also eat some other mosquito predators like dragonflies.
You can encourage these graceful, beautiful and useful birds to live in your yard by erecting purple martin houses, and they'll work to control insects in general, but don't count on them solving your mosquito problem. Houses need mounted high on a pole, and can range from simple gourds to ultimate deluxe accomodations like this, but if you're planning to try to attract these birds, ask an extension agent or read up on specifically to see what they need in your area.
Bats are sometimes also promoted as mosquito predators. They do eat mosquitoes, and since they fly at night, they're out at the right time to catch them. The problem is that they also like a variety of food, and will eat many kinds of insects, so mosquitoes make up only a small part of their diet. Little brown bats showed only 1.8 percent mosquitoes in their fecal pellets, compared to 71 percent moths and 16.8 percent spiders, according to one study. The diet of big brown bats was mostly beetles and caddisflies. 
Bats may have received an exaggerated reputation as mosquito predators, based on a 1958 study on their ability to find insects by echolocation.  Enclosed in a room with mosquitoes, bats could catch on average between 1 and 9.5 per minute, which other people have extrapolated into what they could catch in an hour. But a bat that could catch almost 10 mosquitoes a minute for fifteen minutes in an enclosed room would catch much less than that, out in the wild, with a variety of insects flying in the open air.
Like purple martins, though, bats do eat many insects that are annoying or harmful to humans and their gardens, so encouraging them in the neighborhood has benefits, even if it won't significantly reduce the population of mosquitoes.
Bat houses are best placed in isolated locations, at least 12 feet above the ground, with at least 20 feet of clear space for a flight path into the house. They like to live within a quarter mile of water, so they can drink and also so there will be plenty of insects--but lack of food isn't a problem if you want to attract them to get rid of insects!
Though you might think they prefer homes in cool dark places like caves, they actually like warm, sunny locations, so a southern exposure is best. Mounting a house on the exposed side of a barn is better than in a tree, which is shaded and makes the house accessible to raccoons and cats.
The best time of year to install a bat house is in winter or early spring before they have returned from their winter migration. When they come back north in the spring, they'll begin looking for places to occupy. One study of 28 houses showed that bats found them mounted on buildings or poles in an average of 71 to 73 days, but it took them an average of 255 days to find them mounted in trees. 
The University of Nebraska Extension Service recommends placing the house over ornamental plantings so pets and children are less likely to find and pick up any baby bats that fall out of the house. For more information on bat houses, see their website on Bat House Construction and Installation.
- Dynatrap attracks all bugs, not just mosquitoes, with light and fan
- Mega-Catch Mosquito Trap reviewed--a reliable CO2 trap
- BTI: the natural answer to mosquito control?
 "Purple Martin Mania" by John Miller, Missouri Conservationist, March 2006
 "Relationship of Purple Martins to Mosquito Control," reprinted at Purplemartin.org. "Martins and the mosquito body count," by Douglas Waugh, MD
 Integrated Mosquito Management, University of Wisconsin
 The Echolocation of Flying Insects by Bats, by Donald R. Griffin, Frederic A. Webster and Charles R. Michael, Biological Laboratories Harvard University, 1960, p. 4.
 "Reminder to Owners of Unsuccessful Bat Houses," from Batsnorthwest.org
Purple Martin photo by Rick Kimpel, Wikimedia Commons. Bat photo courtesy of the CDC.