The core halachic hook is in Mishnah Berurah 225:6 and Kitzur Shulchan Arukh 61:8, both of which state that it is a mitzvah to make a seudah on the day a boy becomes bar mitzvah, and both add that if the boy delivers a derashah (a pilpul of Torah) at that meal, the meal retains the status of a seudat mitzvah even if held on a different day than the actual birthday.
This ruling traces back to Yam Shel Shlomo (Bava Kamma 7:37), who establishes that a bar mitzvah meal is counted among the seudot mitzvah — alongside a brit milah, pidyon haben, siyum, and chanukat habayit — while ordinary celebratory meals like engagement parties are not.
Responsa Benei Banim, Volume II 17:8-9 traces the Magen Avraham's citation of the Yam Shel Shlomo and shows that the comparison is explicitly to the meal of chanukat habayit, where the homeowner arranges beforehand to deliver words of Torah fitting the occasion rather than merely eating and making light of the day — meaning the derashah is what elevates the meal to the status of seudat mitzvah, not an independent obligation.
Rav Ovadia Yosef (Maayan Omer 11:5:54) addresses the practical question directly: the meal held exactly on the day the boy turns thirteen years and a day marks his entry into the obligations of prayer in its own right, but a meal held later is not automatically a seudat mitzvah — unless the boy is trained to deliver a derashah there, in which case it is comparable to a chanukat habayit meal and attains that status.
Rav Mordechai Eliyahu (Maamar Mordechai, Hilchot Taaniyot U'Vein HaMetzarim 20:35) rules practically that a bar mitzvah seudah held on its proper day, at which the boy delivers divrei Torah, is a seudat mitzvah permitting meat and wine, citing the same line from the Magen Avraham and Yam Shel Shlomo that the derashah is what secures the meal's status even off the actual day.
Arukh HaShulchan, Orach Chaim 225:4 focuses on the father's brachah of 'baruch shepetarani' recited when the boy becomes bar mitzvah, explaining it is said because the father is no longer punished for the son's sins now that the son is independently obligated — this passage addresses the brachah rather than the derashah custom itself.
Shenei Luchot HaBerit, Shaar HaOtiyot, Kedushat HaAchilah, Emek Beracha 3:10 brings the episode of Rabbi Akiva's feast for his son in Shabbat 67b, where the wine was meant to stir the assembled scholars to speak words of Torah, suggesting an early paradigm in which a father's celebratory meal for a son is directed toward words of Torah being said over the cups, though this passage does not itself speak of a bar mitzvah derashah by name.
Rav Gavriel Zinner (Nitei Gavriel, Bar Mitzva, perek 17) records a concrete historical instance of the custom: at the bar mitzvah seudah of the Imrei Emet of Gur he delivered a halachic pilpul, and his father the Sefat Emet instructed that he not be interrupted until he finished, reflecting an established practice of not interrupting the bar mitzvah boy so that he learns to exert himself in the derashah.