We know that, in this world, human suffering may be due to a test, trial, or punishment. However, these are not applicable for animals. Why, then, do animals suffer pain?
Animals have their own level of choice between doing good or doing bad. Animals which do bad to other animals can face the results of that bad. Animals suffering with out doing bad to other animals will definitely be compensated by Allah, The Most Merciful. Allah never punish or let any creature suffer for no reason or compensation. His Mercy has showered on every thing (Any My Mercy Has embraced everything),Sura 7, Verse 155. And also (Our Lord, Your Mercy and Knowledge has comprehend every thing) Sura 40, Verse 7.
Wassalam.