In the video below I address the three most common causes of a hamstring pull and one exercise to help prevent them.
The first cause of a hamstring pull while sprinting has to do with a training error. In general, your week should be arranged speed before strength when it comes to running. Full speed sprint training within the 2 days of a heavy squat workout, for instance, is a great way to pull a hamstring.
The second cause has to do with adhesions in the muscle, typically the result poor recovery techniques or prior injury. See my previous posts on shakeouts and other recovery techniques.
The third cause is a combination of 2 things, weakness of the upper hamstring in the hip extended position and improper neuromuscular firing orders. This is caused from traditional training techniques with no inclusion of transfer exercises.
The video below will discuss these in further detail as well as how to properly perform a gluteham raise.