Writing good comedy material takes more than jotting down a few jokes. In fact, traditional jokes don't go over well in a comedic routine. A good stand-up comedian can often make a traditional joke work, but traditional jokes need to be very funny. Good comedy has its roots in everyday life. Sit around one day and just watch people in action. You'll find that people do things every day that make great raw material for comedy routines. Keep your notebook handy and jot down the stupid things you see people do. Make character sketches. Watch people and find the traits that make them funny. All of this is raw material for your jokes.
Make fun of tragedy. This is a sticky situation. Tragic events sadden us, but a comedian should be able to find a way to make us laugh about even tragedy. Find a way to make us look at it with laughter. Making light of a tragic situation brings a temporary reprieve to your audience, sending them out the door with smiles on their faces. The tragic material you use and how you handle it is up to you, but making fun of a tragic situation requires the skill to know where to draw the line.
Feel free to pick on people. Ethnic, political and religious groups are always easy targets. A lot of comedic material involves picking on these groups and others. It's okay to do it, but be sure to keep your material funny and stay away from "hate type" jokes. You want to find the humorous aspects surrounding people, places and things without being mean for the sake of being mean. Most cultures recognize humor directed their way and can appreciate it if it's done without malicious intent. Don't forget to make fun of yourself too.
Think about delivery. Good comedy bits may not seem funny to you when you write them, but in the hands of a skilled comedian they can be hilarious. Test your material by having a funny, skilled comedian perform them. If you have some comedic performance skills yourself, gather a small audience of family and friends and do a routine of with your material.
Avoid structuring your jokes. Don't try to write the laughs in. Don't try to dictate where the audience should be amused. One reason stand-up comedy is often called improv is because much of what a stand-up comedian does comes as a result of audience reaction and is often made up on the spot. Write your comedy bits in brief sketches and let the comedian make them his own. The act will no doubt vary from show to show, but if you keep your comedy material fresh and eye-opening, you'll have your audience laughing until they cry.