I'm a Mom to a little girl. I'm sorry to hear that your son gets hurt. Here is some of my thoughts for your consideration. Check out some library books about self defense. You will find information that will apply to both you and your son.
First and far most, teach him to say No. Be very specific with what to say and when to say it. Practice it at home with your son. Ask him to say the words loud. Practice with him with you pretending to be the offender. The way to say no is to say it very loudly and decisively, and in a similar to this. "No! I feel ** when you do *** to me. I don't like that. Please stop ***! You can fill in whatever applies to the blanks.
Kids look to you for directions. If wrongful action was taken like in this case of your son being hurt, you do need to stand up for your son, and ask the other kid to apologize and say they would not do this again. If the kid's parents are around, you need to tell the parent first of what happened. If the parent is not taking the right action to ask the kid to apologize, you need to suggest and insist it. The other parent's hitting the kid, however, is not what you want. It's more important for him to admit his fault to your son and say it will not happen again. I hope you don't take this statement offensively. I personally believe You not standing up for your son may send a signal to him that this happens and there is nothing can be done about it.
Hitting back, however, is not the right thing to do. Your son's being a nice boy is his strength. You don't want to trade that in. Teach him to say No. If that does not work, find the nearest grown up, be it teachers or parents, for justice. If he can't find some one right away, avoid the conflict by leaving the place.