This free guitar lesson by Jody Worrell will teach you a simple exercise you can use to practice your hammer ons. We will use multiple finger pairings and strings. You should strive to produce a loud and clean sound with each hammer on.
Watch the lesson: Quicktime or Youtube
Here is the tab for this exercise.

Hammer-On and Pull-Off Excercises by Jody Worrell is a downloadable Quicktime video lesson that will teach you some simple but effective excercises for building up your technique. These drills will help you play hammer ons and pull offs with each combination of fingerings, build precision, and increase your volume. Being able to effectively use these techniques allows for more expression and subtley when playing guitar licks. $4.99
Watch a preview: Quicktime or Flash