While overall yoga has a greater potential to heal than hurt don't go off thinking the practice is all rainbows and unicorns. The original intent of yoga was not to heal the body but to actually break the body in order to get closer to God. In the early 1900's Great Britain occupied India. They introduced Danish inspired gymnastic type workouts into Indian yoga culture. This likely influenced T. Krishnamacharya who was the teacher of Iyengar and Patabhi Jois.
Enough about the murky waters of yoga history for now. Here's my two cents on why your back is hurting after yoga.
First off, you're not alone. Back pain is the most common adverse effect of yoga according to a 2014 study published in Yoga International. My personal experience was that I didn't have back pain before I started yoga and it continued to get worse the longer and more intensely I practiced. I see clients every week complaining of lower back pain that are yogis.
The most common types of yoga in the west are vinyasa, power flow and Bikram. They are generally quite aggressive, fast paced and have lots of repetitive movements.
Reason #1: Most of us sit for our jobs and then we go straight from work to yoga usually by driving. Yoga classes often start right away with lunges, warriors, and backbends. If the hip is still locked down from sitting then you're going to make up for the lack of hip extension in your low back, often at L5/S1. Ouch!
Reason #2: Over stretching the lower back. If you're doing all your forward folds with straight legs you're likely over stretching the ligaments around the sacrum which can lead to instability in low back. In general you want to make to the hips more mobil but low back more stable.
Reason #3: Overextending and flexing the the low back in deep back bends and forward folds. The facet joints in lumbars are designed only to flex, extend and side bend. The ones in thoracic (mid back) are for rotation and don't really extend or flex much. So unless your hips and thoracic spine are well organized for deep back bends and forward folds your likely hurting your low back.
Reason #4: Inexperienced teachers and bad sequencing. Often times vinyasa classes are sequenced more like a dance class which is fun but not good for S.I joint and low back. Sequencing to many asymmetrical postures in a row can cause this pain. If you've ever had a pain in your ass after yoga thats your S.I joint. Cookie cutter assists and cues are also a reason for inexperienced teachers making low back pain worse in students. Confession: I've been all of these teachers.
I could give more reasons but I think 4 is enough. Here's some ways to combat low back pain in the modern yoga scene.
#1: Get to class 10 mins early and do these movements:
Lay on back and bend knees. Roll your pelvis very gently from tail bone to belt line. You can do it by pushing and pulling with feet or more with the center of you (core) try both.
Straighten one leg and push into other foot thinking of that extending knee over first two toes and keeping it it directed at ceiling. You should feel your pelvis roll and low back and the leg that is straight turn out some.
Practice rolling up into small bridges one vertebra at a time. Start by rolling pelvis towards belt line and then push with feet to press individual vertebra into ground as you go up. On the way down try to set each one down like laying a pearl necklace on a table. You will probably feel that the last few are the most difficult to differentiate. (This is a problem).
The key to these movements is not do them powerfully. Use them to increase awareness of the hip joint rather than to stretch tissues. Yoga class is for that.
#2: Chill on all the extreme stuff. Just because your teacher is pushing you to go back more in your standing Bikram backbend doesn't mean you have to. With backbends I like the cue I got from Jason Crandall which is to try and spread the sensation evenly rather than make the bend bigger. With forward folds just bend your knees so belly rests on thighs. Also teachers please stop sitting on your students in seated folds.
#3: Move at your own pace. Want to skip an up dog? Need to catch your breath? Wanna take a child's pose? Modify or just skip something. Do it! Take care of yourself. Most yoga teachers will respect this. If they don't find a new teacher.
#4: Stop doing yoga for a week. I know to many this sounds insane. I first realized yoga might be causing my pain while spending a month at Esalen. They didn't have vinyasa yoga classes there and I found myself doing more Chi-Gong, Feldenkrais and lots of bath time :). Oddly my low back pain ceased almost completely.
All this being said don't throw the baby out with bath water. Yoga is great. It has the power to transform us physically and mentally, create community, and make your butt look good. However if you've been practicing for years or decades and still deal with back pain regularly it might be wise to step back and take a look at what your actually doing.
Structural bodywork and movement therapy can definitely help shine some lights on your blind spots. Schedule a session if you need help.