Restoring lost paladin (and cleric and druid etc.) powers is basically the entire point of the atonement spell. It also lets you change another creature's alignment, but only if they want to and that's kind of dumb when changing alignment should be something that follows naturally from wanting to in the first place. It doesn't work unless the subject is truly repentant, or if they were forced to commit the acts that caused them to fall via compulsion magic, though. It also works to restore someone's alignment to what it was before if it got changed by some kind of magic (the only way to do that is the helm of opposite alignment, iirc)