Both are correct.
I would use, "Which school did you go to?" if I was in conversation talking about two or more schools.
and "What school did you go to?" if asking a general question.
This is not a rule, more a refinement and my choice. Both are acceptable.