The Sacrament of Penance was established when Jesus gave his Apostles the authority to forgive sins (John 20.21ff). Some may ask, "Why confess your sins to a priest when you can ask God directly?" You should ask God directly as soon as you aware of having offended his friendship by mortal sins.
St. John makes a distinction between "lesser" and "greater sins" (1 John 5.17). It is these "greater sins" that "lead to death," that is, they destroy the virtue of charity we received at baptism, when our sins were washed away. This is why we call them "mortal."
So, we must be reconciled with God through the Sacrament of Confession, because this is how God has chosen to forgive us. Like the blind man that sought Jesus for healing. Sure, Jesus could have just said, "Be healed!." But he chose to spit on the ground, made mud with it and smeared it in the man's eyes, telling him then to wash his eyes and he would see.
God chose to use the priests as his representatives (in persona christi) in the Confessional so that what Jesus Christ accomplished on the cross could be applied to our lives and restore us to God's friendship. We only get baptized once, but for grave sins agsint God, we must confess those sins and peform an act of Penance, as St. James said, "Faith without works is dead" (James 2.14-26).
Before making a good confession, you might want to "examine your conscience." There are many ways to do this. You may click the button below download the form and go over the 10 Commandments and many sins that derive from them.