If doing something usually results in punishment, but you do it with impunity, you will not be punished for the deed. Students are not allowed to chew gum in school, but teachers do it with impunity. Not fair!
The noun, impunity, comes from the Latin roots im- "not" plus poena "punishment," a root which has also produced the word pain. Impunity, then, is the freedom from punishment or pain. If someone has committed a punishable offense but does not have to fear punishment, he or she does it "with impunity." Cybercriminals operate with impunity from some Eastern European countries.