Supposedly intense pains that non-human animals undergo provide significant evidence against theism. Why? Well, the thought is that, if he existed, God could have done things better. But how?
Suggestion 1: He could have made something that has the same motivational effects that pain has but that doesn't hurt.
Response: It's not clear that this is possible—it may be that the qualia of pain reduce to motivational effects and cognitive content. But let's grant it's possible. Now we can ask: Do we have good reason to think God hadn't done this? After all, if the pain-replacement, call it shpain, had the same motivational effects, we would observe the same kinds of aversive responses to shpain as to pain. Maybe we wouldn't expect certain kinds of whimpering. But a dog's whimpering is not quite like human whimpering. I think the reason we see the two as species of the same behavior is because both are associated with similar triggers and similar motivational states. But if the objection to theism that we are evaluating is that God instead of creating pain in animals should have created shpain, then we need evidence that animals experience pain instead of shpain, and if I am right about why we see whimpering as a pain behavior, the whimpering does not provide such evidence.
Maybe we can get some evidence for animals having pain rather than shpain by looking at neurological similarities between humans and animals. This may, however, presuppose the supervenience of the mental on the physical, which is controversial. Furthermore, we do not know enough about how pain systems in the brain work. We know that in addition to similarities between human and non-human brains there are differences. Given that shpain and pain have similar triggers and similar motivational results, on the hypothesis that animals have pain rather than shpain, we would expect a lot of neurological similarity and some difference between animal brains and our brains—and that's exactly what we observe.
Suggestion 2: God could have miraculously prevented pain in those cases in which the motivational role of pain is not important to the animal's flourishing, say when the animal is certain to die.
Response: Let's consider the hypothesis that he has, in fact, done so, and see how strong the disconfirming evidence is. It is plausible that God's miracles would be calculated to produce a particular effect and would be in some way minimal as deviations from the ordinary operations of nature. The reason for that is that there is a great value in the ordinary operations of nature. If so, then what we would expect as a miraculous intervention would be a minimal deviation—one sufficient to relieve the pain. Now, the pain has certain neural correlates. A minimal miraculous intervention might well keep most (if materialism is true) or all (if dualism is true) of these correlates intact. And in particular it might very well be that pain behaviors continue because of the remaining correlates. Now, granted, the fact that we still observe the pain behavior is some evidence against the hypothesis that God has eliminated pain in these cases by being evidence against the hypothesis that God has eliminated pain in a way that eliminates pain behaviors. But unless it was very plausible that the latter is how God would eliminate pain, the evidence against the hypothesis that God has eliminated pain behaviors is not that strong.
Suggestion 3: God could have made a world where animals don't need pain or anything like it, because conscious non-human animals are never endangered by anything.
Response: To evaluate this would require the evaluation of a different argument from the argument from animal pain—the argument from the red-in-tooth-and-claw nature of our world, bracketing the question of pain. I think it is plausible that animal death is not an evil in itself—animals do not naturally have immortality. But death is an ultimate kind of danger, and if so, then the plausibility of the suggestion is decreased. Maybe we could imagine a world where nobody dies before reproducing, but that would be a world where it would be hard for evolution to work, and evolution is valuable.
Conclusions: The problem of animal pain only becomes a problem when one adds some reason to think that God could have done better here. There are three suggestions to that effect. On the first two, the theist can make the reasonable response that we do not have very strong reason to think God hadn't done that allegedly better thing. On the last one, we have a broader problem than that of animal pain.