I am unaware of any "formal halacha" that requires this. As a matter of fact, halachically, absolutely no party whatsoever is required for a Bar Mitzvah.
It has been a long-time custom to make some type of Bar Mitzvah party, esp. in U.S. Ideally, this party should be a Se'udat mitzvah. To do this, typically, a siyum (completion of a Talmud tractate) is made. Sometimes, the Bar Mitzvah makes this siyum, but it could be done by anyone. Regardless, it is common for the Bar Mitvah to make some D'var Torah at the celebration. On many occasions, no siyum is made, however, the Bar Mitzvah and, frequently various rabbis, sometimes associate with the family's shul or boy's yeshiva, give Divrei Torah. (The nicest ones I've seen are where the Bar Mitzvah's D'var Torah incorporates some verse or adage into his appreciation of his parents.)
From what I have seen, this is common protocol at Orthodox Bar Mitzvah celebrations. I have not seen this done at Conservative or Reform ones. However, I have seen Bar Mitzvah say a D'var Torah in shul on the Shabbat that they receive their aliyah in Orthodox (in addition to the one they do at the party) as well as Conservative and Reform shuls.