I think empathy is a very important ingredient to being funny and writing comedy.
In order to be very funny you have to have a sense of how people think and especially how an audience thinks, which I believe is not always the same thing.
However on stage you must appeal to both.
Having the talent to make an audience laugh but yet dig into them personally as individuals is extraordinary.
A good comedian seems to naturally know how to build tension and more importantly, when to release it for maximum effectiveness for laughs and minimum damage.