Peace is the precious fruit of a righteous life. It is possible because of the Atonement of the Savior. It is earned through full repentance, for that leads to refreshing forgiveness.
Repentance is not punishment, it is the hope filled path to a more glorious future.