I would say "If you haven't done anything bad (wrong), then you don't have to worry." For the other sentence I would say "Unless you've done something bad (wrong), you don't need to worry." Each is basically the same. You could also say: "You don't have to worry if you didn't do anything bad (wrong)." or you could say: "You don't need to worry if you haven't done anything bad (wrong)." Please note: we would say wrong or bad - depending on the context.
And for your statement about snoring, you could use different examples, but in the U.S. the most common one is probably: "You were snoring like a chainsaw!"
I hope this all helps.