Just like us humans, not all plants get along. Some need to be separated from each other or they, and your garden, will suffer. Just like anyone who has had an aquarium knows how fish selection is important, everyone with a garden should know who plays well together and who does not.
One thing that most of us know is that you shouldn’t be planting tall plants next to short ones in a way that they will prevent the short plants from sunlight. like tomatoes and beans for example. Also plants that need a lot of water will cause those water haters nearby a great deal of discomfort; the same goes for fertilizer. Allelopathic plants have the capability to chemically impede the vital systems of competing plants. These plants are usually weeds, but many landscape and crop plants have been observed leaving behind allelopathic chemicals. The list of plants believed to have allelopathic properties include: Asparagus, Beans, Beets, Broccoli, Cabbage, Cucumbers, Peas, Soybeans, Sunflowers, and Tomatoes.
Black walnuts have long been known to interfere with garden plants like tomatoes, eggplants and corn. When planting broccoli in your garden, make sure that you practice good crop rotation since broccoli can leave behind residue that other cruciferous crops can’t tolerate. Some plants, like alfalfa, seem to exhibit a remarkable type of allelopathy that interferes with the germination of their own seeds. Garlic and onions are believed to interfere with the growth of beans and peas, but seem to be compatible with most other garden denizens.
Other commonly believed plant incompatibilities include the following plants to avoid near one another: Mint and onions where asparagus is growing Pole beans and mustard near beets Anise and dill neighboring carrots Cucumber, pumpkin, radish, sunflower, squash or tomatoes close to potato hills Any member of the cabbage family near strawberries Cabbage, cauliflower, corn, dill and potatoes near tomatoes
Source: Plant Incompatibility – What Plants Should Not Be Planted Together