The bully keeps on bullying you and you want do anything about it. So they have the right to beat the bully. If they do not do anything about it the bully will keep on bullying the kid. So that's why I think a student should not be expelled from school for beating up a bully.
I don't like to see any sort of violence amongst school children, but when we have one child who has taken it upon themselves to ensure that lives of other children are as difficult on a day-t-day basis as is possible they need to learn that when they mistreat others, others are more likely to mistreat them. In the case of a bully, I think it's a case of just deserts. He/she should know better than to think that they can beat and harass and insult others every day and there'll never be any repercussions for their acts.
If a student is being bullied, then it is their right to rise up against their aggressors and defend themselves. If a student is a bystander in a situation where somebody is being bullied, then it is simply protection of an innocent bullying victim. Frankly, if a student is put in a situation where they are able and willing to beat up a bully, then the school has failed in disciplining the bully and the student is stepping in to fill their role.