Yes, marigolds contain natural compounds that repel certain pests, making them a popular choice for companion planting.