There is no Church teaching that specifically regards making jokes about the Sacraments. In fact, the problem is not really in making jokes as such; the problem lies in speaking disrespectfully about the Sacraments.
The key to understanding the Church’s attitude is recalling that the Church considers the Sacraments gestures that confer grace—in other words, they are capable of making those who receive them holy:
The sacraments are efficacious signs of grace, instituted by Christ and entrusted to the Church, by which divine life [i.e., grace] is dispensed to us (Catechism of the Catholic Church [CCC] 1131).
Since they constitute the very action of God, working through the minister, any sign of disrespect toward them is also disrespectful to God. This is especially true of the Eucharist, for in the Eucharistic species, Jesus Christ himself is present really and substantially. (See CCC 1376). Hence, being disrespectful to the Eucharist is being directly disrespectful to God Himself.
The basis for this attitude can be found in the Scriptures. For example, God clearly commands us to respect Him in the Ten Commandments:
You shall not take the name of the Lord your God in vain, for the Lord will not hold him guiltless who takes his name in vain (Ex. 20:70).
You shall not take the name of the LORD your God in vain, for the LORD will not hold him guiltless who takes his name in vain (Deut. 5:11).
More specifically, as regards the Holy Eucharist, St. Paul admonishes the faithful in his first letter to the Corinthians:
Whoever, therefore, eats the bread or drinks the cup of the Lord in an unworthy manner will be guilty concerning the body and blood of the Lord. Let a person examine himself, then, and so eat of the bread and drink of the cup. For anyone who eats and drinks without discerning the body eats and drinks judgment on himself (1 Cor. 11:27-29).
(Note that St. Paul is talking about the “Lord’s supper” here, which the Catholic Church generally sees as a reference to the Eucharist. This view is supported by the fact that St. Paul recalls the words of Jesus at the Last Supper in verses 23-25.)
Clearly, St. Paul is referring to something different from telling jokes about the Eucharist; he means taking the Bread and the Cup (interpreted, for Catholics, as the Eucharist) while behaving in a way that is incompatible with friendship with God (for instance, by refusing to share with the poor, or by getting drunk—see verse 21). However, it illustrates the principle that the Holy Eucharist is to be respected.
In fact, disrespecting the Sacraments could be considered a kind of blasphemy. The Catechism explains,
Blasphemy is directly opposed to the second commandment. [In the usual Catholic numbering, which follows St. Augustine, that is the Commandment against using the Lord’s name in vain.] It consists in uttering against God—inwardly or outwardly—words of hatred, reproach, or defiance; in speaking ill of God; in failing in respect toward him in one’s speech; in misusing God’s name. … The prohibition of blasphemy extends to language against Christ’s Church, the saints, and sacred things. … Blasphemy is contrary to the respect due God and his holy name. It is in itself a grave sin (No. 2148).
Disrespect for the Sacraments would certainly constitute disrespect for the Church and for sacred things.
As far as sanctions and censures, there is no specific censure for telling (disrespectful) jokes about the Sacraments. In a particularly grave, pubic, and persistent case, the local ordinary* would be justified in imposing a penalty (which could include barring the person from receiving the Sacraments). Such a penalty would derive from Can. 1369 of the Code of Canon Law:
A person is to be punished with a just penalty, who, at a public event or assembly, or in a published writing, or by otherwise using the means of social communication, utters blasphemy, or gravely harms public morals, or rails at or excites hatred of or contempt for religion or the Church.
In practice, however, those who engage in disrespecting the Sacraments are generally not interested in receiving them, and so withholding the Eucharist from them or imposing a sanction is usually neither necessary nor productive. Generally, this sort of thing is best dealt with privately.
* In Catholic lingo, the “ordinary” is the person with immediate (and non-delegated) authority over someone. For example, for laypersons, the “ordinary” is their diocesan bishop, the vicar general, or other persons with similar authority. For members of a religious order, religious congregation, or similar institution, it would be their superior. We say it is a “local” ordinary when we are referring to the ordinary of a territory—hence, the diocesan bishop and the vicar general only. A censure of this kind would generally have to come from a local ordinary or a tribunal appointed by him.