If you have men who will exclude any of God's creatures from the shelter of compassion and pity, you will have men who will deal likewise with their fellow men. ~St. Francis of Assisi
Cruelty to animals is just as bad as cruelty to children - any abuse of the helpless is repulsive. The evil required to take innocence and destroy it for your own ends should be met with the strongest punishment society can muster. If you live in a society that allows the death penalty or flogging etc. these should be put to use. My ideal punishment would have two aspects to it - justice and prevention.
The justice aspect would involve inflicting whatever harm had been inflicted on the animal (or child) on the guilty party. If they had put firecrackers up a cats bum, they should have proportionately sized firecrackers put up their bums. If they had allowed farm animals to starve, they should be starved.
If they survive the justice part of the punishment, then they should be locked up for as long as they are capable of still inflicting similar harm. This prevention aspect would also stop them from breeding or parenting which can only be a good thing. I realize this would create a lot more prisoners but if we stopped locking up people who were involved in victimless crimes we could free up a few places. Why put somebody in jail for 5 years for selling pot when that same resource could be used to keep the scum in the video below out of society for 5 years.
Warning: Don't watch this video if you want to maintain faith in humanity.
I am ready for the trolls to start telling me I am niave to care about farm animals when they are bred to be our hamburger patties in the first place, but I am betting that the people who make that argument have spent very little time on farms. I have lived on a farm and killed animals for eating. There is a humane way to treat animals, and a dignity in even the thickest animals (I'm talking about you Sheep) that requires respect even when taking their life. If you cannot see that in the animals it is unlikely you have it within yourself.
Teaching a child not to step on a caterpillar is as valuable to the child as it is to the caterpillar. ~Bradley Millar