Their tunnels also aerate soil, like earthworms. Though, IMHO, it's pretty foolish to look for specific, enumerated "benefits" of native animals. They co-exist with a variety of other organisms in complex ways and removing any one of them can have unexpected fallout[1].
Also, if we're asking this question about ants, I really hope no one asks "But what are the actual environmental benefits of humans?" about us.
Try thinking about it more holistically. It's not so much that ants on their own are great for a specific purpose, but rather that they work together with other parts of the ecosystem to make the whole thing work. If you're so inclined, maybe it's useful to think about neural networks; take a face-recognition network, pick any node, then ask 'what is this good for?'.
Also, if we're asking this question about ants, I really hope no one asks "But what are the actual environmental benefits of humans?" about us.
[1] https://ethology.eu/how-wolves-change-rivers/