Spilt was once the standard past tense and past participle form of the verb spill, but in modern English the word has mostly given way to spilled in all its uses. The old form does survive, though, especially outside North America, where spilt appears about a third as often as spilled. Where spilt survives, there is no consistent rule governing when to use it and when to use spilled. They are interchangeable.
This ngram graphs the use of spilled and spilt in English-language texts published from 1800 to 2000. It shows the switch from spilt to spilled occurring around 1900.
But when we narrow the focus to British English, the switch occurs later:
Most of 10 tons of spilled corn will be left beside US 87 [Houston Chronicle]
The Fisher River has spilled its banks so many times in recent years, fighting floods has become routine. [Winnipeg Free Press]
It spilled over seven pages and veered into such topics as when the state should hold its presidential primary. [Los Angeles Times]