Baptism is for the remission of sins, and the sacrament is a renewal of the covenants and blessings of baptism. Both should be preceded by repentance. When we keep the covenants made in these ordinances, we are promised that we will always have His Spirit to be with us. (Ensign, Nov 1998, 37)
The renewal of our covenants by partaking of the sacrament should also be preceded by repentance, so we come to that sacred ordinance with a broken heart and a contrite spirit (see 2 Ne. 2:7; 3 Ne. 12:19; D&C 59:8). Then, as we renew our baptismal covenants and affirm that we will “always remember him” (D&C 20:77), the Lord will renew the promised remission of our sins, under the conditions and at the time he chooses. One of the primary purposes and effects of this renewal of covenants and cleansing from sin is “that [we] may always have his Spirit to be with [us]” (D&C 20:77). (“Always Have His Spirit”, Ensign, November 1996, p.59)
I say let everyone who is guilty of sins they have not repented of, and made restitution for, refuse to partake of that bread, also of that water, (which is an emblem of the blood of Jesus that was spilled for the remission of our sins,) until they have repented and made restitution; for unless you do, you shall drink damnation to yourselves, until you make restitution. I do not care who the persons are….
Now, gentlemen and ladies, what do you think of partaking of this bread and this wine in remembrance of the Lord Jesus Christ?
Some of you, doubtless, have been guilty of committing more or less sin, of being more or less rebellious to the authorities of this Church, and to the Priesthood and government of God, and then coming and partaking of this sacrament. Do not such persons comprehend that they are drinking damnation to themselves? Why should persons wish to partake of this sacrament, when they know that they are unworthy?
I want to warn you and forewarn you not to trifle with this ordinance, nor to indulge in any unwise conduct. I desired the opportunity of telling you my feelings before this bread is dedicated and consecrated. I do not consider that it is dedicated and consecrated to any person that cannot eat it with an upright heart, or to one that will eat it and then live in a course of rebellion against God and His authority. (Journal of Discourses, 4:81)