Bats are not the evil, bloodsucking airborne predators that Hollywood depicts. Although it's true that some of them can be rabid, the percentage is very small. But if you ever have to handle a dead bat, do so with gloves. You can get rabies from saliva and tissue; and if someone does get bitten, it's important to retain the bat, particularly the head, so tests can be performed on the brain to determine if the bat was rabid.
The best way to keep bats out of a house is to close up all the openings where they can get in—by applying caulk in gaps on the “seams” of the house, and plugging up obvious holes with screening, hardware cloth, and sheet metal as needed. You can also tell by observing the house at dusk or dawn. That flutter of leaves you see leaving or returning to the house ain't leaves!
Bats like to roost behind shutters. To stop this, shutters should be spaced an inch or two from the wall to allow light into dark spaces; bats don't like LIGHT.
In some buildings, it isn't possible to close all the openings. The next best thing is to shine a light in the suspected area for twenty-four hours a day for a couple of weeks during early spring and summer, when bats return to warm-weather months from caves, where they stay in winter. In some cases, ventilating an area can keep bats out. They don't like cold. Sometimes sprinkling mothball flakes or mothballs or spreading a thin layer of sticky bird repellent in areas is helpful.
Before closing up a building, make sure there are no bats, including baby bats, inside. The best time to do this is the cold-weather months.