With these places, but only when they´re used for their main purpose, rather than just for a visit or when they are considered as buildings:
He went to school in England = he was educated
You mustn´t smoke in class. = during lessons
We go to church every Sunday. = to worship
She´s in hospital. = for treatment
He´s going to university. = to study
But: She drove to the school to pick up her son, then to the university to pick up her daughter.