Garlic is a great companion plant for tomatoes. Chives, Onion and garlic emit a pungent aroma which repels many insects. Garlic also releases sulfur into the soil that is beneficial to Tomatoes and detrimental to soil borne pathogens.
Sulfur is a naturally occurring fungicide which will help in the garden with disease and pest suppression.
It discourages aphids, flea beetle, Japanese beetle, fungus gnats, codling moths, cabbage loopers, ants, Root maggots, snails and spider mites. There is also some proof that it deters mammalian herbivores such as rabbits and deer.
Many of these pests plague tomatoes and related crops, so yes inter planting with garlic will be beneficial to your tomato plants. There are plants that do not fare well in the presence of Garlic such as asparagus, strawberries, beans and legumes. Some brassicas should also be kept away from garlic.