If your 7 year old son came home from school in a diaper it's because he wet his pants or pooped his pants.
Usually most schools now will just have the parents bring a change of clothes for their kid when they have an accident.
However it depends on the school.
I remember being in Kindergarten a long time ago and I had wet my pants and so I had to wear a plastic back thick pampers diaper for the rest of the day.
I was also sent home in the pampers and had to wear a diaper for at least a week until I could keep dry.
It was school policy then but now most schools don't do that but it can vary from school to school.
Either you should send your kid to school in a pull up or diaper so that he can keep his pants dry.
It's normal for kids to wet their pants in school as it happens to lots of kids.
Wearing a diaper is less embarrassing than having wet pants though.