Where does Toad's ability to spit thick, instantly hardening, suffocating slime come from, you know that slime he used on Jean Grey in the first Bryan Singer X-Men film? I've seen it in some of the X-Men shows and comics, but this was after the Ray Park character was introduced.
To the best of my knowledge, the first Bryan Singer X-Men movie is the first instance of Toad having this power. Previously, he had only displayed the powers of agility, wall-gripping, and an extended, flexible tongue.
I cannot speak to why it was decided Toad should gain this power, but it did serve as an effective plot point - it helped split up the heroes so that there could be moments for each one to shine and character development (such as it was). It also helped set up for Storm's line about toads and lightning (which I can only imaging was supposed to sound much cooler than it did).
Following the movie, this power proved popular enough that it was incorporated into other media. It appeared in the X-Men Evolution TV show (which used many designs/influences from the Singer films) and eventually migrated to the comics as well.
Toad gained the power to spit the resin after tinkering with his own genetic makeup using the Stranger's technology.