There are too many caterpillars that are being born and there is not enough space, food or water for all of them to live and survive. That's why it makes it easier for the birds to catch them and eat them.
Not all of the snails are green. Some caterpillars are born with other color such as blue, yellow or even red. That's why a lot of the caterpillars are competing to stay alive and get away from the birds because it's a lot easier for the caterpillars that are not green to get eaten.
Since the green caterpillars blend in more with the environment they have a higher chance at survival and they get to produced more often. They are avoided and it's a lot less of a chance for them to get eaten. That's why the have the best adaption to this kind of environment.
The other colored caterpillars stand out a lot more than the green ones and because of this it makes it easier for them to be spotted. The green ones blend in with the grass and bushes, so that makes it easier for them to hide.