1,400 species of bats exist worldwide, with 39 species in the US and Canada. The different species eat different things, but most bats eat insects. There's research that suggests the presence of bats reduces the number of mosquitos in that area.
Of the 39 bat species in the US and Canada, only 13 dwell in caves year-round. The others live in rock crevices, or in the cavities of trees. Some have found homes in man-made structures, like under bridges, or in old buildings. Many have undergone significant habitat loss due to deforestation and urban development.
Building or buying a bat house gives bats a place to live in your area.