From the Official Dilbert Website
In my book, The Joy of Work, I have a chapter on how to write humor. It won't make you funny but it might help you figure out why you aren't funny.
I do not comment on the comics of other cartoonists. It wouldn't help you if I did. When a comic strip works, it's because of a weird chemistry between the cartoonist's writing and artwork and subject matter and the audience. No one knows why some things work and some things don't. But here are some general rules I've noticed:
1. Other people are not like you. If you create cartoons that you like, you're probably only appealing to other cartoonists. I made that mistake early on in my career when I did a lot of comics that focused on clever puns. If you want to preserve your artistic integrity and vision, that's fine, but don't expect to make money doing it.
2. Your readers care about themselves, not you. Readers will perceive as funny anything that "hits home" even if it isn't all that clever by any objective standard. Unfortunately the only person you know well enough to "hit home" with on a regular basis is yourself. Write about the situations that you have in common with other people. The common situations can be analogous, not exact. For example, you might have a weird hobby that thrills you but makes others roll their eyes. It doesn't matter if readers share your hobby, only that they might indulge in something that is also disdained by others. It's the feeling of disdain that should hit home, not the hobby.
3. Don't listen to your friends who tell you your comics are hilarious. They're lying. Don't listen to your friends who tell you your comics suck. They're idiots. The only reliable feedback is the copy test, i.e. does someone want to copy your comic and show it to someone else who you don't know. If someone says he likes your comic but he doesn't ask to copy it for someone else, he doesn't really like your comic.
4. Comic writing is similar to business writing. Learn what a passive sentence is so you can avoid it. Get rid of unnecessary words. Never say, "Bob was very mad" when you can say, "Bob was mad." (emphasis added!)