Grains especially wheat, barley, rye, and corn. Soy, potatoes, tomatoes, legumes/peas, and dairy all potentially can do a lot of damage to the digestive tract. This ends up overwhelming the immune systems and weakens it, so allows bacteria and yeast to grow out of control throughout the body including on the skin. It is also incredibly itchy.
Also the lack of omega fatty acids can cause dermatitis. Most dog foods are cooked at very high temperatures, which destroys all the omegas. Also air exposure will destroy them. So even if the bag says it contains omega 3 and 6, it really does not have any. Same with canned foods. Omegas are essential for healthy skin, coat, joints, eyes, etc. Especially omega 3. Supplementing with a good quality fish body oil is a good idea.
Lack of moisture in the diet can also cause dermatitis. Dogs are designed to eat a diet that is at least 70% moisture. If you are feeding a dry food, which is around 10% moisture, most likely your dog is chronically dehydrated. Since they are designed to take in most of their water through food they are not very good at knowing how to keep themselves properly hydrated through drinking.
There are other things that can cause it, like mites. But your best bet nutrition wise is to feed a high moisture food, low in carbohydrates, high in protein and supplement with omegas.
ADD: Grains, soy, nightshades, legumes, and dairy all contain lectins that stick to the walls of the digestive tract as well as to the villi. This damages the body's ability to absorb nutrients. To combat malnutrition the body thins the walls of the digestive tract to allow nutrients to leak directly into the blood stream but also allows undigested proteins to leak, which causes an allergic reaction. So any proteins source will cause allergies because they are all leaking into the blood stream. So yes grains DO cause allergies. It can be denied as much as you want but it is a fact. My dog had horrible skin problems and allergies and I have cured them 100% with diet. All the drugs the vet gave did nothing. Chicken doesn't even bother her anymore because her digestive tract is healed and nothing is leaking and causing an allergic reaction.
Hydrolyzed proteins are not a cure. They are proteins that are broken down into amino acids, essentially pre digested, so even if they leak they will not cause an allergic reaction. They work but your dog will only be able to eat hydrolyzed proteins for the rest of its life, until the digestive tract is healed. Plus most prescription hydrolyzed dog foods are hydrolyzed through a chemical process and are very low quality and expensive. Might as well spend the money on a high quality food that will not damage the digestive tract and actually cure the problem. I agree that grain free does not equal high quality. Grains are not the only ingredient that cause damage. It must be low carbohydrate and free from the above ingredients. You won't find it in a dry food. Canned or homemade are the best options for skin problems.