First you must find them with their tell tale sign. Signs like their tiny black sand size poop on leaves and leaves are disapearing Once you find them pick the hornworms off your plants and kill
them. You can squash them with your foot or dump them in a bucket of
soapy water. Alternatively, if you don't want ot touch it you can cut it with a pair of scisors right off the leaves.
There is a time that you dont want to kill these hornworm. Sometimes you will see small white object protruding on their bodies. Some type of wasp would lay their eggs on these worms,and soon devour the worms when they hatch. You want to hatch these
eggs so more wasps will help protect your garden. Just gather these worms with wasps eggs and transfer them to your weakest plant. They will eat and probably kill that plant, but you will have
a new generation of parasitic wasps to protect your garden.
Buy a product called BT or bacillus thuringiensis.This is use to kill hornworm. This will not harm pets humans or the enviroment. This is effective, and sometimes you can see the results the next day. You may use this organic product throughout the season.
When the planting season ends remove the dead plants and pulverize the soil all the way down where the roots grow. By doing that you will destroy much of the pupae present.Thus threre will be less of them next season. Well hopefully that answers some of your questions on how to get rid of hornworm in your garden.