See below. In my experience, stretching has been one of the most consistently effective treatments for lower back pain although not everyone agrees with that statement. Our spines are meant to move and meant to be flexible. When we lose that flexibility, pain often follows.
Is stretching a cure. In my osteopathic manipulative pain practice, I actually find that in many cases, tight muscles are not the root cause of pain; they are a result of loose ligaments in the spine, sacral, & pelvic regions. Ligaments should prevent too much motion, but muscle should create motion. Loose ligaments can't do their jobs, so muscles tighten to do it for them. Prolotherapy is often better than stretching.
Tight Hammies. Understand there is a complex relationship between the normal curvatures of the spine, and the rotation of your pelvis. When hamstrings are tight, this reverses these curves slightly, changing the way your spine bears weight. Loosen up these hamstrings, and the spine/pelvis can be free to accommodate the normal balance of your spine.