French marigolds grown next to toms ward off aphids. Basil with toms is supposed to improve the taste. Grew both and I didn't have a big problem with aphids in the GH this year and the toms were ever so tasty.
Garlic grown next to veg wards off aphids, as does coriander and mint,. Chevil is supposed to ward off aphids from lettuce although I've not tried that one.
Tansy - a strong smelling plant is supposed to deter ants, not tried that one either.
Nasturtiums are supposed to be a magnet for caterpillars and are good grown next to brassica's, the jury's still out on that one, I grew both this year, although the nasturtium was several feet away from the brassica's and a path in between, the brassica's were covered in caterpillars and not one on the nasturtiums.
I've grown cornflowers in troughs next to my veg beds and they've attracted aphids. One of the nice things about planting in troughs ot pots, once infested, you simply move the trough or pot away and the problem goes with it.