Lyric discussion by grouping 

What strikes me is that it is important to hear the whole story before judging the protagonist. He states first that he did shoot the Sheriff -- he makes no excuse or apology for that. This may lead the listener to assume he is guilty of the shooting of the deputy. As well, it suggests that even if he is not guilty of the crime of shooting the deputy, he will be convicted. This is counteracted by his claim of self defense, which in most cultures will exonerate the defendant. Of course, there is still the charge of resisting arrest, but that is usually not a "capital offense". The speaker also asserts that the Sheriff (one "John Brown") exceeds his authority with prejudice, so the resistance of arrest may in some measure be justifiable.

The only missing element is the identity of the killer of the deputy, of which the speaker seems ignorant. There is no evidence I can find that this was based on any real event. It was written by Bob Marley, and it might be assumed that his version is what he intended. "Better" is a matter of taste and cannot be accurately disputed.

An error occured.