I had to edit my question because I think it led to misunderstanding.
For me, the definition of "immunity" is quite different from "impunity", and I know the differences. But what I don't know is that is the law the thing that draw the line?
It seems to me they both refer to exemption from punishment.
for example, a police officer can kill a criminal, whereas I cannot.
Another example is that a diplomat raped and tortured two women but nothing happened. But if a man who has a powerful and wealthy father did that, the word impunity would be said.
So, here is the question:
Does only the law define the differences?
Best Answer
According to the Grammarist immunity has a broader meaning than impunity which is rarely found outside legal contexts:
Immunity vs impunity
Example usage:
Immunity
Impunity