Hamstrings and hips get a lot of stretching in yoga, because everyone wants to do Hanumanasana, and also get their feet behind their heads, preferably both feet at the same time. For many, this will never happen, precisely because they try so hard and focus only on one set of muscles without understanding the interlinking between the muscles of the hips, legs and lower back. Please refer to Lower Back Pain: Some Yoga-Related Causes for an explanation of these relationships.
Many older anatomy textbooks describe the Hamstrings like this: their main action is to flex and stabilise the knee, and their secondary action is to extend the hip, together with the Gluteus Maximus. The Hamstrings have a much more complex function at the hip: together with the hip flexors, mainly the Iliopsoas, they determine our pelvic tilt, and thus, posture.
If the stabiliser muscles of the hips and back are weak and inhibited because of a high proportion of leg strengthening postures – mainly all the variations of Virabhadrasana, Utkatasana and Parsva Konasana, the hamstrings cannot lengthen because the core stabilisers don’t provide enough of a counter-force.
At the knee, hamstrings are antagonists of the Quadricep muscle group, and according to Physiotherapists and Biokineticists, the quadriceps should be stronger than the hamstrings, if the knees are to be healthy and pain-free. Also, weak and tight Quads inhibit and weaken the Gluteus Maximus, destabilising the hips.
Asanas which use hip flexion and knee extension, like Utthita Hasta Padangustasana (when the big toe is not held), Navasana, Viswamitrasana, Titthibhasana and Utthita Surya Yantrasana should be practised more than Asanas which use hip extension, such as Dighasana, Ardha Chandrasana or straight-leg lifting in Sirsasana.
This is often practised the other way around in Yoga. Because the Hamstrings work at both the hip and the knee joint, contracting the Quadriceps when stretching the Hamstrings is very important because then the Hamstrings will relax and stretch at the knee, as well as at the hip. If Hamstrings only stretch at the hip, this can cause tendinitis at the Ischium (Sit bone), which is quite common in yoga, and then the Hamstrings do not lengthen at all. Tendinitis should always be treated by a Professional.
Adductor muscles are powerful synergists of both the hip flexors and Hamstrings, please refer to Adductors, the Pelvic Floor and Lower Back Pain and if these are tight, hip abductors are inhibited and won’t stretch. Tight Adductor muscles are best loosened dynamically, than through passive stretching, moving from side to side in lateral squats is very effective. Flexibility in the legs and hips is more a matter of muscle balance than stretching, constant tightness and pain without specific injury is usually a sign of muscle imbalance and will need professional treatment whereas trying to stretch muscles in this condition will only cause injury.
Reading sources: De Franca, 1996, Pelvic Locomotor Dysfunction Ellenbecker, De Carlo, DeRosa, 2009, Effective Functional Progressions in Sport Rehabilitation Boyle, 2005, Functional Training for Sports