Hi! So, I can't exactly answer this as a writer/artist, but, I do have a lot of background as an actor, and I can answer the best I can from that perspective!
Timing is quintessential, is the TLDR of it. What @VibrantFox said is absolutely true, just about-- all of it? To add on, and try to explain timing more, it's that jokes are almost like their own mini-story, if that makes any sense! You need time to make sure that people understand the set up of the joke, to then execute it. Cutting a joke too short is like suddenly throwing down who the BBEG is in a mystery novel. It deprives the reader/viewer of a chance to react. You don't want to drag on too long, however, as well, but that's more of a battle of toeing the line and figuring out what your own internal comedic timing is. Just about anything can be a liiitle humorus with the right timing-- I think black comedy is a great example of that, like...
Dentist: “This will hurt a little.”
Patient: “OK.”
Dentist: “I’ve been having an affair with your wife for a while now.”
As an Actor, you would know to make what the Dentist's saying set up casually, and thereby not hold any vocal pauses or any intonation that you're going to even speak after the patient speaks, as the punchline is surrounded by it being unexpected news for the situation/event. That's where Action (Line Delivery) and Timing intermingle, I think. The question, then, is-- how does that transfer over to writing/drawing/ect? In comics, I've noticed (especially webtoons!) a good way to pad 'time' or make the readers wait for a joke or a reaction, is to put space inbetween the panels, like... Were any of you on tumblr for the Color of the Sky apocolypse thing? That's one way to visually force timing into a visual medium, I think.
I really don't think I can explain it better than Vibrant did, though! That's a concise list with clear direction. Know your material, know your audience, understand your intention.