Universities have conducted research to show that certain plants have the ability to repel certain types of unwanted insects or they attract beneficial predator insects that combat the insects you don't want on your growing food. Co-planting is definitely a strategy to consider when grouping plants together with pest pressure in mind.
We've compiled the results from these studies into a reference chart that you can print and put in your Garden Journal to refer back to as needed. On the above horizontal header, you have common pests to plants grown in the garden (i.e.: aphids, white fly, etc) and in the left column you have the plant that typically repels that particular pests (or it could be an attractor plant and pull that pest away from your desired crop.)
We hope you find this resource to be helpful!