Usually, these annoying hamstring aches are the result of weak glutes and/or tight hip flexors.
Here's how it works in general:
Muscles can't push, they can only pull. This means that for every muscle that does something (agonist), there's another muscle that does the opposite (antagonist). We are wired neurologically such that when the agonists are causing a joint to move, the antagonists are inhibited (known as reciprocal inhibition). Yes, this is an oversimplification, but hopefully you get the idea.
Here's how tight hip flexors can cause weak glutes and strained hamstrings:
Muscles in front of the hip that help to raise the leg forward (hip flexors) become tight. This is especially common in people who sit alot, such as those who have jobs where they are required to sit at a desk or in meetings all day. Tightness in the hip flexors tends to inhibit the hip extensors (glutes), which in turn puts additional strain on the hamstrings (hamstrings flex the knee as well as assist the glutes in extending the hip). Basically, this means that the hamstrings are having to do the glute's job in addition to their own. Even if this doesn't cause an injury, it can affect running performance by decreasing stride length, which in turn results in slower running at a given stride rate.
So what to do about it? Try stretching hip flexors, followed by some bridging exercises to actively recruit the glutes.
If double leg bridges are too easy, try single leg. If single leg bridges cause the hamstrings to cramp or the inactive hip to drop, the glute is still too weak.
If single leg bridges are too easy, try an active lock bridge, where you actively engage the hip flexors of one leg to hold a small ball or towel against your abdomen while bridging with the other leg:
Keep practicing until you can do the active lock bridge without hamstring cramping. By improving your glute strength, you will probably notice that your hamstring aches disappear, your flexibility improves, your stridge length increases, and you ultimately have faster runs at the same stride rate as a result!