There can be several reasons for that.
1.) Your glasses may not be "beer clean". Dampen the inside of the glass and pour some salt on the sides. Scrub it around thoroughly then rinse. see if that improves things.
2.) Recipe can be a factor. For one thing, extract tends to have less protein (protein helps from foam) because the extract has already been boiled. Adding some grain, like crustal malt, can help that.
3.) Hoppier beers will have better foam. The polyphenols in the hops bind the proteins in the beer and help create head.
4.) Most people don't realize that fermentation plays a big role. Pitching the proper amount of healthy yeast and maintaining a correct fermentation temp will help a lot. This article explains it, as well as having tests you can do to help you diagnose your problem....http://byo.com/stories/article/indices/ ... techniques