Have you ever laughed until you've cried, or cried so much that you just had to laugh? People aren't equipped to feel one emotion all the time, and that's why they can't read books that are just one thing. Whether you're writing a comedy or a tragedy, all good books have elements of both. That's what makes them good...because life is both.
Walking the Line
By a certain school of thought, all books fall into one of two categories: comedy or tragedy. But within that framework there are infinite story possibilities, numerous twists and turns. No story should ever be all comedy or all tragedy, because every reader will reach a point when they can't laugh or cry anymore. But if you learn how to jerk them back and forth between the two, they won't be able to stop reading.
Most people feel several emotions in the course of a single day, sometimes even at the same time. We laugh, we cry, we get grumpy, we feel anger. This is natural. That's why the best books make us feel all those things, too. Books that make readers experience a lot of emotions are the books that become the most meaningful and memorable.
In other words, you can't write all tragedy or all comedy. Every tragedy should have lighter moments, amusing scenes, maybe even a funny one-liner. People need to laugh when they're exposed to tragedy, even when it's only on the page.
By the same token, comedies should have a serious side as well. A book that's only funny is like a dessert. It's light and fluffy and sweet, but at some point you're going to put the ice cream down and pick up a sandwich because your stomach can't tolerate it any more. So give your readers a little salt with all the sugar. Add some darker moments to those comedies. Anchor the story in some cold realities, because they're always going to intervene.
Don't stay on one side of the line or the other. Walk the line and give your readers both comedy and tragedy. In the end, you'll write a much better book.