The ordinance of the sacrament is designed for those who have been baptized. The sacrament renews baptismal covenants and renews baptismal sanctification. Therefore, the Lord instructs the sacrament to be given to those who repent and are baptized. Although little children don't need the sacrament for purposes of repentance and sanctification (see Moroni 8:8-13), they should not be restricted from this ordinance. Indeed, they are the most worthy to receive it! Neither should non-members be expressly prohibited. They may, however, be counseled about the meaning and purpose of the ordinance, and then be allowed to make their own judgment as to whether they should partake.
Spencer W. Kimball
"Long, long ago, there were some of the wards who refused to permit anyone other than a member of the Church to partake of the sacrament, with the thought that they were taking it unworthily. There are those who feel, as you have indicated, that little children should not partake of it. And, there are those who partake of it whenever it is passed regardless of how unworthy they may be but to save themselves embarrassment, I suppose….
"The sacrament is to serve us in somewhat the same manner as the sacrifice did from Adam to Christ…. Both the sacrifice in the old days and the sacrament in our day are to keep us reminded of our covenants, that we will remember the sacrifice, that we are willing to take upon us the name of Christ, and that we will remember him and keep his commandments.
"The Lord, himself, said, 'And now behold, this is the commandment which I give unto you, that ye shall not suffer any one knowingly to partake of my flesh and blood unworthily, when ye shall minister it... Therefore if ye know that a man is unworthy to eat and drink of my flesh and blood ye shall forbid him.' (3 Nephi 18:28-29.) Apparently, he is not speaking of little children but of men who are accountable and responsible and who would defile themselves or the program and unworthily partake. Even in this case, he would not have the man cast out unless he was vicious….
"The sacrament is for the Saints, for those who have actually made covenants at the waters of baptism primarily, but there is no evidence that I find where the Lord would ever exclude the children who were rapidly moving toward baptism and who were learning and being taught to worship the Lord and be ready for the covenants as their age and development would permit….
"If a person, not a member of the Church, is in the congregation, we do not forbid him partaking of it, but would properly advise that the sacrament is for the renewing of covenants. And, since he has not made the true covenant of baptism or temple covenant, he is exempt. However, his partaking of the sacrament if he is clean and worthy and devout would not bring upon him any condemnation as it would for those who have made solemn covenants and then have ignored or defied them." (Teachings of Spencer W. Kimball, p. 226)