I mean, there's many other spells he could've cast, but why choose to launch a snake of all things?
The premise of this question may be flawed. You ask why Malfoy used a snake-summoning-spell rather than any other spell. But wouldn't you have the same question if he had used any other spell? If he had summoned a different animal you could ask why he did specifically that. If he had used the Bat-Bogey Hex you could ask why he specifically used that. No matter what he would have used, there would be other spells that he didn't use.1
Whenever something has to be chosen out of a group of possibilities, there will by definition be other possibilities that were not chosen. Even if all of the possibilities have equal reason to be chosen, only one of them can be chosen. That means that it is possible for something to be chosen without there being a specific reason for it being a better choice than the other candidates.
Since there is not much information in the book surrounding Malfoy's choice of spell, we don't really know why he chose it. It might have simply been the first spell that popped into his head (or Snape's head, if that's what Snape whispered to him) or one of the few spells he was capable of performing. Of course, for plot reasons it was important for Malfoy to use this spell, but from Malfoy's own perspective we simply don't have a basis to assume that there was much of a strategic reason in the first place.
1. As the medieval philosopher Gersonides wrote in the introduction to his book of philosophy (translated by Seymour Feldman):
Hence the reader should not inquire concerning these things why we have treated this thing before some other thing, since [he thinks] that the other thing should be treated first because of one of the aforementioned reasons. We have in fact treated one particular subject first precisely because of one of these reasons: and it is obvious that if we had adopted the reverse order the same question would have been raised.
Er, why cast a cool and showy spell in front of the whole school, you ask? Being awesome needs no reason.
And, in spite of Harry's perspective, Justin was never in any danger -- Snape, like everyone else, was surprised by Harry's unexpected response to Lockhart's unexpected attack on the snake.
One it was clear that Harry was done speaking a rare language and not aiming to do anything else, only then did Snape tend to the simple expedient of dispatching the patiently calm animal with a quick puff of smoke.
Out-of-universe, it was clearly to lead to revealing that Harry was a Parselmouth. In-universe, the Malfoys are a Slytherin family (and the mascot of Slytherin is a snake), and are fond of reptilian imagery. Lucius has a snake head on his cane, the family crest has two dragons and two snakes, "Draco" is from the Latin for dragon, etc.