Canon law tells us that we should go to Confession at least once a year if we have any mortal sins on our souls and to go to Holy Communion at least once during Easter time.
In the United States, Easter time is considered from Ash Wednesday to Trinity Sunday, which gives the penitent almost three months to go to Communion; however, as soon as you are aware that you have mortal sin on your soul, you should get to the sacrament of Penance as soon as possible.
Mortal sin cuts off your relationship with God and neighbor. When you die with mortal sin on your soul, you send yourself to damnation. In the rare case that the sacrament is not available—for instance, if one is in danger of death—one can make a perfect act of contrition. This type of contrition expresses the sentiment that one is truly sorry for his sins, not because he fears the pains of hell and the loss of heaven, but because he is truly sorry for offending Almighty God. However, if the emergency passes and the person lives, he must go to the sacrament of Penance as soon as possible.
Spiritually, Confession can be received as often as you need the sacrament. For example, if you are trying to rid yourself of an immoral habit, you might need the sacrament much more frequently. If you want to receive the healing gift of grace, you may make frequent devotional confessions. It used to be the custom to go to Confession every time Holy Communion was received as a way of preparing the soul for the Blessed Sacrament. Today, it is recommended that Catholics go to Confession monthly. A monthly examination of conscience, followed by Confession and absolution, will aid the soul in maintaining its baptismal purity and innocence.
Another devotion that involves Confession is divine mercy. This feast, instituted by Pope John Paul II, takes place the Sunday after Easter. It entails Confession at least one month prior to the celebration of the feast in order to receive all the merits.
In cases of receiving a plenary indulgence, the Catholic must either go to Confession seven days prior to or seven days after the spiritual act is performed in order to receive the indulgence.