One of the reasons was very successful deception.
The Allies used various methods, including dummy tanks and aircraft in southern England, to convince the Germans that they were actually planning to land somewhere else (in the Pas de Calais, not Normandy). So the Germans kept back their reserves because they feared the Normandy landings were just a diversion.
In general, the Germans had a big coastline to defend, so they had to spread their forces more thinly than the Allies. One advantage any attacker has is that he knows exactly where the battle will take place, while the defender has to guess.
Of course, it was also helpful that the allies had complete control of the air. They had around 10,000 aircraft to support the invasion, whereas the Germans only had a couple of hundred. It made it very difficult for the Germans to move reinforcements, supplies etc, because the Allies could immediately attack them from the air.