You often read that we are commanded to enjoy shabat and the festivals and because of that we must do X – e.g., drink wine, eat meat. What is the source for this commandment?
The source from scripture that is mostly cited is in the Tora:
And thou shalt rejoice in thy feast, thou, and thy son, and thy daughter, and thy man-servant, and thy maid-servant, and the Levite, and the stranger, and the fatherless, and the widow, that are within thy gates. Seven days shalt thou keep a feast unto the LORD thy God in the place which the LORD shall choose; because the LORD thy God shall bless thee in all thine increase, and in all the work of thy hands, and thou shalt be altogether joyful.
(Deuteronomy Chapter 16, 14-15)
In these verses "feast" refers to the "feast of the tabernacle", i.e., Succot. But the verse is often recited as a reminder to rejoice in other festivals as well, e.g., Maimonides cites it as a proof text for the commandment of simcha on all holidays in his Mishne Tora (Hilchot Yom Tov, 6:17). Note that the Hebrew word for "joy" that is used is "simcha".
The above applies to holidays, but not to the shabat. The source text cited for shabat is from the prophets:
If thou turn away thy foot because of the sabbath, from pursuing thy business on My holy day; and call the sabbath a delight, and the holy of the LORD honourable; and shalt honour it, not doing thy wonted ways, nor pursuing thy business, nor speaking thereof; Then shalt thou delight thyself in the LORD, and I will make thee to ride upon the high places of the earth, and I will feed thee with the heritage of Jacob thy father; for the mouth of the LORD hath spoken it.
(Isaiah 58, 13-14)
The Hebrew word used in Isaia for "delight" is "oneg". Rejoicing on shabat is therefor the mitzva of oneg shabat (Mishne Tora, Hilchot Shabat, 30:1) and it is different from the mitzva of simcha.
The mitzva of oneg applies to the holidays as well as shabat (Hilchot Yom Tov, 6:16), but the mitzva of simcha applies only to holidays, not to shabat. Of course, shabat is still by its very nature a joyous occasion, so you shouldn’t start to be sad on shabat!