An antiquated term for insanity, madness. Belfry: the top of a bell tower on a church, where the bell is housed. Often infested with bats, who enjoy the darkness and seclusion of the place.
She's got bats in the belfry, sqirrels in the attic, owls up in the loft. She's apeshit, bughouse, batty, mad as a march hare.