Herbs and flowers are the best companion plants for tomatoes to keep bugs away. For the protection of your tomatoes from pest bugs, you can plant basil, bee balm, sweet alyssum, garlic, chives, mint, anise, onion, nasturtium, and parsley.