All you need to know about caterpillars, your common garden pests
Caterpillars, the larval stage of moths and butterflies, include bagworms, gypsy moths, leafrollers, and tent caterpillars (all four are covered in this section). Other caterpillars that cause trouble in fruit and vegetable gardens are cabbage worms, codling moths, and hornworms. Adult cabbage worm butterflies lay eggs on foliage of crops such as broccoli, Brussels sprouts, cabbage, and cauliflower; the eggs hatch in a few days, and the pale green caterpillars then consume the leaves. Codling moths afflict apples and other fruits. They lay eggs on mature blossoms, just as fruit begins to set; when the caterpillars (white with brown heads) hatch, they feed inside the fruit as it grows. Hornworm moths lay pale green eggs on leaf undersides of plants such as eggplant, pepper, potato, and tomato; the bright green caterpillars (large enough--up to 5 inches long!--to give many a gardener a start at first sight) then devour foliage and strip stems bare.
Cabbage worms pupate on stems of the plants they eat, making it difficult to eliminate them in the pupal stage. Instead, cover vegetable plants with floating row covers to prevent adults from laying eggs on them. To reduce codling moth populations, clear ground of all debris each fall; pupae overwinter in debris at ground level. Hornworms pupate underground. Till soil each spring to expose and dry out pupae; rotate susceptible plants to new locations each year. Handpick any hornworms you see. All three of these caterpillars are susceptible to Bt, but it must be sprayed when they are just emerging and feeding heavily.
Chemical controls against caterpillars include carbaryl and malathion. In the case of codling moths, you must spray before the just-hatched caterpillar burrows into the fruit. If codling moth is a known problem in your area, routinely spray susceptible trees just as fruit begins to set.