This sounds like a typical situation for many children - it can happen to anyone. Chances are something happened at school that either embarrassed or frightened him/her. It could also be something your child did to someone else. It might be a teacher, student (possibly a bully), or something that you child said or did. The scenarios are endless. There are a few things you can do to see if you can determine the problem.
First talk to your child. Try opening up the conversation with on of your own stories. For example you may have been teased or did the teasing. Maybe something happened during class and someone laughed at you. It could even be a time when a teacher directed a comment to you that hurt your feelings. This might break the ice so your child will open up.
Ask the teacher. Maybe he/she saw or heard something that could give you insight as to what happened or what is going on. The teacher could also have some ideas that can help to smooth things over so your child likes going to school again. This will also bring attention to a problem that the teacher can keep an eye on during school.
Ask one of your child's friends or their parents. Often child go home and tell stories about what happened to other child in the class.
The main thing is to keep the lines of communication open.