Here are two good columns that address this question rather nicely:
EDIT: At Hugo's insistance, I'll at least give a tease:
Though the first part does come from the Greek word sophos ("wise"),
there is no direct relation to the Greek word for "foolish" as is
commonly believed. In truth, sophomore is a variation of sophist, a
word that has a long and twisted history in itself.
In Ancient Greece, the Sophists were initially a class of professional
teachers who gave instruction in various fields. The word eventually
took on a derogatory sense and was applied to someone of this class
who, while professing to teach skill in reasoning, was more concerned
with ingenuity than with soundness of argument.