It could be either a minor pull/tear or just a hamstring weakness. The solution to both is the same, what I would do is start performing SLDL, Stiff Leg Deadlifts. Do them from the floor and preferably with a rounded upper back. Start slow, work up to 1 top set of 5 done three a week.
Key is to start very slow, 40kg and build slowly from there.