Last year I had a tremendous problem with earwigs in my vegetable garden. Crawling nocturnal beggars that they are, they're not the easiest thing to get rid of without resorting to chemicals (and they were demolishing young plants at an alarming rate!)
I planted marigolds with the hope that they would repel them along with the flying insects; I didn't expect it would be all that likely to work, but if the experiment failed, well, at least I had some colour in the veg. garden.
The next morning I discovered that marigolds are a food of choice for earwigs - leaf, flower, everything but thickest stem, was gone.
It didn't work as I'd planned, but the marigolds managed to survive and they did serve to distract the hordes of earwigs from my food - all in all it was a success.
This year I've added marigolds to my seedling trays