Every novel is different. Just like every writer is different.
This tip is a bit difficult to address. I remember my mom always telling me when I would speak at church, "Dustin, you are very funny, you need to add humor when you speak."
For the longest time, I always thought talking about the things of God was no place to add humor - or at least it didn't feel right to me. I soon learned that it was best I add humor, especially when the topic was very serious or really deep. The listener can feel a bit overwhelmed at times, and it is sometimes best to lighten the mood.
So how does this transfer into writing? God knows how serious some of our topics can be and throwing in a good laugh in the middle of a court room drama or at the height of a novel's suspenseful climax can be disheartening, and not just for the writer.
ALL ABOUT TIMING
Therefore, it depends heavily on timing. Sadly, however, there are a lot of people - during their writing or just general conversation - who have no sense of timing when it comes to humor. For those people, I cannot help. For those who do possess a solid sense of humor and have a knack or at least some sense of timing, this is for you.
Take for example, my novel Fight. It is a thriller with a lot of bloodshed, suspense, criminal characters, revenge, fighting, suicide, and dark twists. So how does one go about tossing humor into the story? Very carefully.
BE OPEN TO THE OPTION OF HUMOR
More often than not, the humorous situation or dialogue will come out of you and will fit perfectly. The best way to plan for that is to be open to it. Don't shut it down just because you think your book is above humor. No work of any kind is above the genius of comedy, even of the simplest and slightest of kinds.
But what if it doesn't come naturally in the story? Here is the catch 22.
As you continue writing, take an overview of your work and gather a feel for where the tone of the book is. If it feels overbearing, then gear up to lighten the load a little. Give the reader some places to breathe. Yes, there are some books written about rape, incest, and all sorts of vile topics, and those topics are very, very, very difficult to get through regardless of how well-written they are. Keep in mind - even with those types of topics - that your characters (fiction or non-fiction) are human. They possess a sense of humor, even if you think their life has ripped humor from them.
POSIT A SIDE CHARACTER
I'm not saying that your main character needs to be a comedian. In fact, your main character might not say or think one funny thing in the entire book, but that is an opportunity to install some comedy relief (relief is the main word here) with a side character. Give the reader something to remember from a humorous point of view, because they will definitely remember the main idea or ideas presented in the book.
Don't, however, force humor just because it is lacking in the book. Be strategic about it. Good writers don't force - they allow.
Being funny is a gift and some are blessed with that ability and some are not. But just like writing, practice makes perfect. Try your hand at humor every chance you get - in life and in writing. Life's too short to be so serious all the time.