Yoga helped me a lot with lower back pain. It strengthens the core, opens up the shoulders, increases hip flexibility, etc. In less than 6 months I have no back pain anymore and I feel that I have a considerably better posture.
The comments about the dangers of doing yoga are valid, but every sport or exercise can be dangerous depending on your condition, even swimming which is usually recommended as a safe sport. General tips are: ask your doctor for movements that you should avoid, tell your yoga teacher about your condition, if it hurts don't do it. More importantly I think, is for you to understand your condition. Read about it, feel your body and how it reacts to each exercise.
For example, even though I should avoid back bends they still help me build strength and improve my posture when done carefully. I am always aware of that during my yoga practice so I either skip the back bends or I do them softly, depending on how I feel.