It's important to make sure a class is a good match for you.
Whether you take a class in person or online, find out the style of the class. How often does it meet? You need a time frame of 6-12 sessions to really develop as a writer.
Make sure the class teaches the kind of writing you're interested in. Non-fiction? Children's novels? Short stories? Check out the class syllabus. If you can, talk to people who have already taken the class and find out what they got out of it.
What are the instructor's credentials? Look for someone with experience in writing (and selling that writing) in the area of your interest.
Size matters. In this case, the smaller the better. You'll get more individual attention and nuturing in a class of, say, 12 than in a class of 35.
And remember, as with any class, what you take away from it depends a lot on what you put into it.