Companion Planting is the placement of various crops in close physical proximity to one another so as to symbiotically compliment each others health, vigor, growth and the flavor of their produce. It also naturally involves separating plants whose development is antagonistic to each other.
A plant that attracts a certain class of insect pest, fungal or microbial pathogen should not be placed near another plant that is adversely effected by the same pests and pathogens. A plant that depletes certain nutrients from the soil that is needed by its neighbor should be separated from those plants so as to avoid competition for those nutrients.
Tomatoes – Attracts many of the same pests that feed on Corn. Such as the Tomato Fruitworm, ironically also known as the Corn Earworm. Tomato hornworm is another pest that feeds on both corn and tomato plants. Potato aphid, Beet Armyworm, cutworms, fall armyworm are a few others and there are many more. Planting Corn and Tomatoes together is a bad idea.
Potatoes are touted by many Garden gurus as a “good neighbor of corn”. Potatoes are closely related to tomatoes and attract many of the same pests.
Potatoes need high levels of organic nitrogen and potassium , corn does also, at roughly the same times as potatoes, so hence they are competing for the nutrients. The only viable advantage of planting corn and potatoes together is the shade furnished by the corn to the potato plants. Potatoes are a cool weather crop, inter-planting them with corn furnishes the partial shade they need during the dog days of summer. This works fine if you only have a small patch of corn, if not properly laid out the potatoes could be starved of sunlight.
There is no evidence that potatoes provide any benefit to the corn stalks. Planting Corn and Potatoes together is a not a good idea.
Cucumber, pumpkin, squash are compatible with corn, they can be grown with maturing corn stalks, will serve as a living mulch, although not as efficiently as some plants and will themselves benefit from the shade of summer sun. Be sure to use varieties that fare well in partial shade. Expect to see slightly lower yield from curcubits grown in this fashion. 
Planting Sunflowers with corn is said by some to increase the yield. This is not proven out – however sunflower and corn do work very well together in a rotation scheme.
Corn produces a beneficial fungus known as arbuscular mycorrhizal that enhaces the plants phosphorous uptake.
The fungi emit fungal filaments somewhat like mycellium known as hyphae from the root system into the soil. These fungal filaments create minute channels in the soil. Sunflower following corn takes advantage of these root channels and follows them to extend further into the soil to find even more nutrients and water. – Sunflower & Corn: Rotational Synergy
Peanuts and legumes enhance the growth of corn. The corn provides a source of support for the peanut plants which can climb up the corn stalks. The corn plants make out on the deal, because the peanut plants add nitrogen to the soil, which encourages corn’s growth and increases corn yield. This is basically the same principle that is used with other legumes and closely related crops such as pole beans
Sweet corn is a heavy feeder that takes nitrogen and other nutrients from the soil. Plant some climbing beans at the base of each corn stalk. The stalk will support the beans, while the climbing beans’ roots will fix nitrogen from the air into the soil where its needed most. Peas, sweet Peas – same scenario as peanuts and pole beans – they fix nitrogen and can be grown with corn.
The seeds are eaten raw, popped like popcorn, cooked as a hot cereal, ground into flour and so forth. Pigweed serves as a deterrent to many forms of leaf mining insects, which is another one of its qualities. It’s primary quality for the purpose of Companion gardening is that it draws up nutrients from deep within the soil to where the corn roots can reach them. It is highly invasive and should you decide to try some – it must be kept in check as it has been known to spread rapidly.