Positive commandment · Mitzvat Aseh #53 of 613
To appear [before G-d in the Temple] on the festivals
להיראות ברגלים
The verse · Devarim 16:16
שָׁלוֹשׁ פְּעָמִים בַּשָּׁנָה יֵרָאֶה כׇל־זְכוּרְךָ אֶת־פְּנֵי ה׳ אֱלֹהֶיךָ בַּמָּקוֹם אֲשֶׁר יִבְחָר בְּחַג הַמַּצּוֹת וּבְחַג הַשָּׁבֻעוֹת וּבְחַג הַסֻּכּוֹת וְלֹא יֵרָאֶה אֶת־פְּנֵי ה׳ רֵיקָם
“Three times a year shall all thy males appear before the Lord thy God in the place which he shall choose; in the feast of unleavened bread, and in the feast of weeks, and in the feast of booths: and they shall not appear before the Lord empty:”
The Rambam’s words
To appear [before G-d in the Temple] on the festivals, as [Deuteronomy 16:16] states: "On three occasions during the year, all your males shall appear...."
להיראות ברגלים, שנאמר: "שָׁלֹשׁ פְּעָמִים בַּשָּׁנָה יֵרָאֶה כָּל זְכוּרְךָ" (שמות כג יז; שם לג, כג; דברים טז טז.
Why · Sefer HaChinuch #489
To appear on the festivals in the Choice House
“It is from the roots of the commandment [that it is] in order that all of Israel see and place upon their hearts, through the act of the sacrifice which awakens the hearts, that all of them — from the small to the great — are G-d’s portion and His inheritance, a holy and chosen people, those that guard His testimonies, the treasure from all the peoples under all of the skies [that] keep His statutes and observe His religion.”
Who & when
“And there I wrote by whom it is practiced and by whom it is not practiced and all of its content, as is the custom of the book.”
Where in the Mishneh Torah
Hilchot Festival Offering הלכות חגיגה