There are good horror movies and bad horror movies. Two examples of good horror movies – subjectively speaking, just my own personal taste – are The Omen and Sixth Sense. Nothing to do with comedy at all.
Conversely, there are good comedies and bad comedies. Nothing to do with horror movies.
And then there is Young Frankenstein. Certainly a good comedy – one of the very best, in fact. You might even classify it as a horror movie as well, in which case it would rank, once again, as one of the very best.