Strong legs are vital to any golf game, so strengthening the hamstrings is important. Doing so while keeping stress off the knees (also vital to your game) is important as well. Fortunately, there are some exercises that strengthen the hamstrings while going easy on the knees.
Lying Leg Curls
Lying on your stomach on a leg press machine, pick a weight you're comfortable with. With your hands holding the grips that come with most leg press machines, bring your feet and the weights as close to your back as possible, then return to position. Try doing this 10 to 12 times for three sets. The machine works the hamstrings but is very low intensity and doesn't grind or work the knees.
Standing Leg Curls
This is essentially the lying leg curl, stood up and performed with one leg. Climb on to the leg press machine and do a standing leg curl with one leg, then switch legs. Do approximately 10 to 12 reps with each leg for three sets.
This exercise is knee-safe as long as it's performed with either no or very little weight in your hands. To begin a walking lunge, stand upright with or without the dumbbells in your hands. Lunge forward with one leg, making sure your knee never advances past your toe. Once you get close to touching the floor, push off with the back foot and near the standing position. Repeat with the other leg and perform as many times as necessary until you feel your hamstrings being worked.
Exercises to Avoid
It's best to stay away from intense workouts like squats and dead lifts--they can put unnecessary pressure on the knees. If you choose to do these lifts, do so with a very small amount of weight to reduce intensity and strain on the knees.