It depends. Social Security may consider the fact that you are going to school inconsistent with the reason while you are applying for disability. For instance, if you are alleging that you suffer from bi-polar disorder or paranoid schizophrenia or any other mental condition, Social Security may consider this as evidence that your impairments are non-severe. Specifically, they may consider that you are capable of performing all of the necessary tasks that accompany being a successful student, i.e., paying attention for extended periods of time, accepting instruction, getting along well with others, etc. Likewise, if you alleging that you suffer from a disabling physical condition, a judge may wonder why you are going to school to be a carpenter or auto mechanic since both jobs would require you to work around heavy and dangerous machinery.
Furthermore, depending on the frequency and length of your classes, Social Security may view your schooling as equivalent to work. For instance, your class schedule may require you to be at school for close to forty hours per week. Additionally, those classes may require homework or other extra-curricular activities. As such, a class schedule can easily start to look more like a work schedule, and the more it does, the more detrimental the effect on your claim.
In closing, it is important to realize that the more strenuous and time consuming your class schedule, the more likely Social Security will consider it analogous to work.