The antonym of sin is good deed. Sin means an action that is against religious rules, so the antonym should be in accordance with religion.
According to many dictionaries virtue is the antonym of vice. Because it's referingreferring to something moral rather being religious.