There is a general belief that writing funny stuff comes naturally to some. Funny people have a gene, a natural gift which can't be produced by learning 'techniques'. This may be true but there are definitely some tips that can make one sound funny!
Humor is a point of view and an approach that almost everyone has as a child. There are several times when one reads some funny stuff, laughs and says, "That is SO true" and a lot of times it is. Humor can be based on truth of what can be or what is.
Choosing funny names for characters and experimenting with more than just ordinary people can make a script or a piece of writing sound really funny. A writer can use motifs like aliens, super-humans, inanimate things coming to life, or even animals.
If running out of material, a writer can copy jokes from a random email which is going around. For instance, a joke on the difference between how women and men drive. Even if people have read this numerous times, it will still tickle their funny bone. Similarly jokes around Clothing Stuff, online stuff, and family stuff can also draw out big laughter.