Corn is not inherently unhealthy for a dog, but it has been linked to food allergies and has a low nutritional content. Small amounts of corn can be healthy and enjoyable for a dog, but corn is a filler and should never make up the bulk of a dog's calories.
Dog food and corn started to become associated in 1956 when kibble was invented. Corn is a cheap filler crucial to the binding process needed to shape dry dog food, providing cheap extra calories. It is also an inferior source of energy for dogs when compared to meat, especially because it is fat-free, low in protein and difficult for canines to digest. Corn also has a high glycemic index associated with swings in blood sugar levels.
While corn is safe for dogs, corn on the cob is not. A dog may choose to gnaw on and then swallow the cob whole. The corn kernels digest, leaving the cob stuck in the intestine, where it can block food from passing through. At first a blockage may look like a simple case of constipation, but if left untreated, an intestinal blockage can perforate the walls and may need surgical intervention to correct.