Squirrels are notorious for digging through gardens and destroying tomato plants before they even fully develop. Even if the squirrel isn't particularly fond of tomatoes, it won't stop them from plucking several of them off and taking a bite. Your first instinct for protecting your tomato plants may be to put a fence around them, but the best protection is making your garden less appealing to squirrels. Squirrels rely on their sense of smell, so strong or offensive smells will send them running every time.
Put moth balls around your garden about every 5 feet. Do not let them touch the plants because this could alter the flavor of the tomatoes.
Put a washcloth in a small bowl and fill it with vinegar. Place one of these on each corner of the garden. The smell of vinegar is unappealing to squirrels, so they will likely turn away when they smell it.
Sprinkle crushed cayenne pepper around the plants. Like with most pests that intrude gardens, the hot smell of cayenne is a major deterrent.
Pour coffee grounds at the base of your plants. The smell will turn squirrels away, plus the coffee will make the soil more acidic which is good for tomato plants.
Put up a squirrel feeder if nothing else seems to work. Put it as far away from your garden as possible. Squirrel feeders are readily available at most garden supply stores.