If you redeem yourself, you make up for wrongs by doing something that makes you seem good again, like when after being irritable and snappy with your grandmother, you redeem yourself by bringing her flowers and apologizing.
Redeem comes from the French rédimer, which means "to deliver," and which in turn comes from the Latin for "buy back." In Christianity you can be redeemed by renouncing your sins. Classic heroes fail and then redeem themselves with valiant acts. But redeem doesn't have to be religious or moral. When you turn in a glass bottle for recycling, you redeem it, just as you redeem your coupon for 20% off your next hamburger.