Looks like there was an answer here to a similar question a few years ago, but it was deleted.
There have been several threads on "disco destruction"; one I recall that I can no longer find pitched the idea that it was a rural backlash against urban "decadence", but that seems to be a minority theory. Hopefully someone can address the homophobia and racism factors head-on, but while you're waiting, check out these
/u/hillsonghoods in Disco music is almost synonymous with the 1970s. What caused it's spontaneous decline at the end of the decade?
/u/theBloodening in Why did so many people hate Disco?
/u/HamburgerDude in How much of the American population actually participated in the "decade-defining trends" of the 1960s (hippies/free love/etc.), '70s (disco), etc?