The legitimacy of the use of violence against someone resisting arrest depends wholly on legitimacy of the law or rule that instigated the police interaction in the first place.
To use a hyperbolic example, we would not say that the Nazi SS was justified in killing Jews who "resisted arrest" for the crime of being Jewish. This seems obvious, but the same logic is for some unknown reason not applied to other contemporary cases.
A. Man murders child. B. Police attempt to arrest man. C. Man resists arrest. D. Police kill man. "D" is a rightful action because "A" is a wrongful action.
A. Man grows plant. B. Police attempt to arrest man. C. Man resists arrest. D. Police kill man. "D" is a wrongful action because "A" is a rightful action.
I'd disagree that the legitimacy of violence rests on the legitimacy of the law; I'd say it's legitimate if and only if there is clear and present danger to others if that violence is not used; with the exception that if the government has made itself (not just the law) illegitimate no violence on its part can be legitimate.
So in the example of the murder of the child - if resisting arrest means, for example, punching a cop, then no, lethal force would not be legitimate, if lesser levels of force would have sufficed to bring him in before he could hurt anyone else (and if he didn't pull a gun on the cops). The man has presumably not been convicted yet; the cops cannot act as judge, jury and executioner just because he's being difficult. If he's running away and there's a decent chance they won't be able to catch him again before he harms another child, then lethal force could be justified.
If a man is growing marijuana, and he resists arrest by punching a cop, then no, lethal force would not be justified. If he runs away, then lethal force would not be justified, because even if he continues growing marijuana, there's no clear and present danger, unlike in the above example. I would say lethal force would be justified if and only if he starts waving a gun around, because now, regardless of the legitimacy of the drug laws, he is presenting a danger.
The SS officers would not have been justified in killing Jews for resisting arrest, under any circumstances, not because they were enforcing one particular illegitimate law, but because in choosing a policy of genocide, that government made itself illegitimate in its entirety, and therefore could no longer legitimately enforce any law with violence. But I don't think this is a widely applicable example, because while genocide delegitimizes a government, I don't believe laws against recreational drugs do, even if the laws themselves are illegitimate. I suppose others may disagree.
Your responses are very reasonable. We all make certain assumptions. I am trying to challenge the very root of the assumptions underlying your argument here, so please bear with me.
Here is why I believe the legitimacy of the violence rests with the legitimacy of the law.
(For the purposes of this, let's assume "violence" refers to some vague appropriate level of violence.)
You, me, and Frank live on an island. You have a bad habit of attacking me whenever we cross paths, because you don't like the color of my eyes. I use violence to fend off your attacks. This happens repeatedly.
My violence is justified because it was in self defense, yours is not. Because you wrongly initiated the violence for an illegitimate reason.
I get tired of these confrontations and I hire Frank to protect me. The next time you attack me, Frank steps in and uses violence to fend off your attack.
Your violence is unjustified, Frank's violence is justified. Frank's violence is legitimate because
since I have the right to use violence to defend myself,
I also have the right to appoint someone to use violence to defend me
on my behalf.I find the chewing of gum to be quite irritating and disgusting. I decide gum is no longer allowed on the island. I see you chewing gum. I tell you to spit it out. You refuse. I try to take it out of your mouth. You refuse, and push me away. In response to your push, I punch you. In response to that, you punch me back. In response to that, I punch you into submission and pry the gum out of your mouth.
My violence is illegitimate, because I initiated the use of force for a wrongful reason. I have no right to prevent you from chewing gum. You are in the right, I am in the wrong.
Frank agrees with me about the gum thing. We vote, and it's 2 vs 1; gum is outlawed on the island. I see you chewing gum again. I call for Frank. He shows up and tells you to spit the gum out. You refuse, and a similar exchange of blows is carried out.
You are still in the right. Your use of violence was legitimate. Frank's was not. For the exact same reasons.
I have no right to tell you not to chew gum. Frank has no right to tell you not to chew gum. Just because we "vote" on this does not change this. People cannot give "government" rights that they don't have to begin with.
Because it is wrong for me to use force to prevent you chewing gum, it is also wrong for me to appoint someone to use force on my behalf to stop you from chewing gum.
When the police use (appropriate) violence in the enforcement of laws against rape, murder, theft, etc, they are justified. Because people have the right to prevent these crimes against themselves, they have the right to give the government the power to prevent these crimes on their behalf. Because people have the right to use force to prevent these crimes from happening to them, they have the right to appoint the police to use violence on their behalf.
People have no right to tell others not to grow marijuana. They have no right to initiate the use of force to prevent growing it. Hence, they have no right to ask the government to prevent people from growing it. Hence the police have no right to use violence to prevent growing it.