Marigolds are bright, beautiful, and have a pungent smell that’s off-putting to many pests, including snakes. Their roots also release a substance that can deter small rodents—another way to keep snakes away, as rodents are a primary food source for them.