It depends on the yoga class. If it is a really difficult, "power" yoga class, I wouldn't do much but walk before it. If it's more of a relaxation/stretching class, it should be fine. I say this because a lot of people who don't do yoga correctly or on a regular basis don't realize how hard it actually is, if you intensify the poses.
Bikram yoga is by far the hardest on your body. If you do this, I advise you have plenty of yoga experience and bring a lot of water. You can burn a lot of calories doing this, and I wouldn't exercise before.
Most yoga classes burn anywhere from 150-250 calories, depending on your body size. I use them mostly for shaping, toning, body-weight muscle building, and flexibility work. They are harder if you mix them in with other workouts (your body doesn't know what to expect). However, unless you plan on doing yoga on a very regular basis (every day, at least), I wouldn't rely on this as your main mode of exercise.
The meditative benefits on body stress, however, are fantastic.