I went to a class for all mine...knowing what I know now from the process of both I think it is the right decision, particularly for me, and I'll tell you why.
Going to classes forces face time with instructors who are (hopefully) knowledgeable and are, or have been at one point working in the field. You can communicate and get real answers and get real time feedback. It also forces interaction with other people and allows for interaction to potentially create friends/contacts down the line. Also, in the school I went to atleast, there is a lot of recruiting done through the school, so brokerage teams come by and offer lunch to those who want to sit down and listen to them pitch about working for their team.
I am personally that type who just doesnt do well with online only type stuff, and I knew I just wouldnt learn as much. I have taken all of my continuing education courses online and it is a joke. Most programs out there give you ample opportunity to simply cheat on quizzes/exams to pass their courses very fast.
The Real Estate Exam is not very hard and I really think I could have come very close to passing it without any study work and simply using common sense, educated guessing, but there is a lot you simply will not even know anything about without proper studying.
If you are self motivated, not very social or care to be, and know you will learn in-depth and want the freedom of being able to do it on your own time then take it online.
If you like interaction, and doubt your will power to really study something on your own and not cut corners simply to achieve the end piece of paper result then take classes.
I live in Texas though, so we are only one of a few states that seems to actually require any real amount of education to recieve a license. A majority of states seem to be something you could do over a weekend online. I recommend the face to face classes depending on your requirements, but if I could go back I probably would have done atleast one class online I think, as some of them were dragged out and pointless.