~로/으로 is for physical directions/movements
while ~에 is about the usual, self explanatory business.
나는 학교로 갔다 = I went to the school (you went to the parents meeting that happened to take place at school for example)
나는 학교에 갔다: I went to school (you are a most probably a student or a teacher)