Ibn Ezra says that he was reveling like all young men tend to do, and Sarah was jealous of his being older/ more impressive than Isaac. He does not elaborate further, so that seems to be the reason she wanted Ishmael sent away, according to him.
Rashbam says on the word מצחק that Sarah noted his age and was worried that he would contend with Isaac for the inheritance. Perhaps Ishmael's ostentatious behavior caused her to notice this. (This could possibly shed a bit of light on Ibn Ezra?)
Sforno says He was making fun of the party that was being made in Abraham's house, claiming that Sarah had gotten pregnant from Abimelech, not Abraham. Ishmael hadn't made this claim up to this point, because he had heard it after Isaac's birth from scoffers. Alternatively, Sarah hadn't noticed his derisive claim, being busy caring for Isaac.
Nahmanides says that Sarah saw Ishmael making fun of Isaac or the meal. Being the "son of Hagar the Egyptian", Ishmael was a servant making fun of his master, being thus punishable by death or lashing. Sarah instead asked that he not inherit with Isaac, sending Hagar as well to ensure Ishmael's survival, which would have been tenuous without his mother.
Rashi says that this is either a language of idolatry, illicitness, or murder. This is based on the opinion of the Sage Rabbi Akiba. Nahmanides cites Maimonides, who cites the Tosefta Sotah 6:6, or Midrash Rabah (30th paragraph from the bottom), in which the Sage Simeon son of Elazar/Yohai objects to Rabbi Akiba's interpretation, on the grounds that Abraham would not tolerate such acts in his house, Rather Ishmael was challenging Isaac's right to the inheritance. RSB"E claims that Sarah's focus on inheritance when she tells Abraham to send Ishamel away attests to this1.
1. If I may I'd like to offer and understanding of this seemingly figurative argument. Note for example that Rashi doesn't say Ishmael did these things, only that מְצַחֵק is a language of these things. I do not think Rabbi Akiba is claiming that Ishmael actually did those grievous sins at his half-brother's weaning celebration. Rather, he is articulating aspects of Ishmael's personality. He was מְצַחֵק, laughing. A person laughs at something that they find silly or aren't taking seriously. Rabbi Akiba is explaining that Ishmael made light of the God of Abraham, or that he made light of the severity of sexual deviance, or that he made light of human life. Those three attitudes are, after all the root cause of the three severe sins that are mentioned. Rabbi Simeon son of Elazar/Yohai objects to this, claiming that Abraham would not have made such an error in parenting that would leave his child ingrained with any of these ideals, and provides his alternative understanding.