From an article titled “When Batman Was Gay” on The Bilerico Project:
Early Gotham was a dark and scary place, the sort of place that might inspire people to, you know, dress up like a giant bat. So what happened? Why did the dark and menacing Batman of 1940s become the lame and tame Batman of the 1960s?
Well…turns out it was a New York “liberal” intellectual that outed Batman:
The accusation that Batman was a homo, as strange as it might sound to our own ears, was taken quite seriously by government and public alike. It wasn’t leveled by a marginal nut or crank, but by a world-renowned psychiatrist, Dr. Frederic Wertham.
Wertham was the Chief Psychiatrist for the New York Department of Hospitals and an important figure among the New York City liberal intelligentsia.
Wertham seemed obsessed:
Batman and Robin, Wertham charged, inhabited “a wish dream of two homosexuals living together.” They lived in “sumptuous quarters,” unencumbered by wives and girlfriends, with only an aged butler for company. They cared for each other’s injuries, frequently shared quarters, and lounged together in dressing gowns. Worse still, both exhibited damning psychological characteristics: proclivities for costumes, dressing up, and fantasy play; secretive behavior and double-lives; little interest in women; and, most damning of all, neurotic compulsions resulting in their violent vigilantism. Indeed, Wertham argued, depictions of Batman and Robin were frequently homoerotic, visually emphasizing Batman’s rippling physique and Robins splayed, bare thighs.
“Only someone ignorant of the fundamentals of psychiatry and psychopathology of sex can fail to realize the subtle atmosphere of homoeroticism which pervades the adventures,” wrote Wertham. “The Batman type of story may stimulate children to homosexual fantasies.”
You’ll have to read the rest yourself to see how 1950s cultural homogenization and the “Lavender Scare” of the Cold War era “camped up” Batman making him more palatable to a less gay-friendly America.