Both "Klassenkamerad", and "Schulfreund" are used for a classmate in school. Are there different connotations, regional differences, or social differences when using one or the other?
Oh yes, there is quite a distinction to make between these two words.
"Klassenkamerad" indicates a person who shares the same class with the person speaking. However, it doesn't say anything about the relationship between these two persons! They might be friends, but they also might be archenemies. It simply indicates the share the same class(es).
"Schulfreund" on the other hand clearly implies a friendship that is related to having spent some time together in school. In most usecases Two "Schulfreunde" don't even have to be in the same class, it's enough that they spent some time together in the same school, so it refers to the place where you met. But there is another subtle distinction: A "Schulfreund" might also be a friend that you got to know at an age where you both went to school, so it doesn't even have to be the same school you two went to.
For me, a Klassenkamerad is somebody in the same class, where I get along with (so, we have a friendly relationship. I wouldn't use it for somebody I do not like - apart form sarcastic usage).
A Schulfreund is a friend from schooltimes, not necessarily in the same class. The relationship is closer then a Klassenkamerad.
A Klassenkamerad is defined by random - somebody else (the school) put us together., A Schulfreund is selected by me amongst my Schulkameraden.
Both Klassenkamerad and Schulfreund is used by third people to refer to someone who just went to the same class, but Schulfreund is also sometimes used in the narrower sense of specifying that this is a friend you know from school.
Note that it is not uncommon to falsely use friend like this, compare the joke:
Wie steigert man Feind?
Feind, Todfeind, Parteifreund
(How to you form the comparative and superlative of enemy? enemy, archenemy, "friend" from the same party)
Here, again Parteifreund is an euphemistic term to denote someone from the same party, it is practically always used by third people and often with an ironic connotation.
I suppose user is right insofar as Klassenkamerad has a slightly old fashioned feel to it. Very young people probably wouldn't use it. The military connection is not very strong, though. Also, "Klassenkameradin" for a girl is absolutely acceptable as far as I'm aware.
The distinction is exactly like the others said - similar to "classmate" vs. "friend from school": despite the "-mate", the former is not necessarily a real mate of yours, the latter is.