To a certain extent there's a wider question to ask - why did German armies fight so well in WW2? I say that because the answers to both questions overlap. The effectiveness of ordinary German soldiers made their generals look good, and good generalship made the soldiers effective.
But to restrict this answer specifically to the senior officers I'd say the answer lies in these six points. Points 1, 2, 3, 4 may explain why German military leadership was so "impressive", while 5 & 6 may explain why it has long been considered impressive at least in the English speaking world.
1. Effects of WW1 Manpower Losses
Germany suffered terrible losses in WW1 amongst middle ranking officers, which led to rapid promotion through the ranks. This meant that relatively youthful officers got their chance to prove themselves at a young age in the 1914-18 war. By the time WW2 came round these experienced officers were in their prime. Of course Germany was not alone in this regard, though only France suffered comparable losses. But as the WW1 victors, France and Britain were naturally in no hurry to clear out their senior WW1 generals and these were retained into WW2 (Gamelin was 68 in 1939, Weygand 73).
2. Effects of the Versailles Restrictions
The Treaty of Versailles restricted Germany to an army of 100,000 and also imposed limits on certain kinds of weapons. It's possible this led to a culture which valued officers who could offer creative and imaginative solutions to tactical problems.
3. Effects of Defeat in WW1
The German army staff between the wars avoided that classic military error of "preparing to fight the last war" whereas French and, to a lesser extent, British planners, fell badly into that trap. Germans were keen to experiment with new technology and this meant the German army was better placed to use planes and tanks in bold, decisive new ways. It's easy to see why senior German officers using such tactics appeared better generals than their opponents.
4. Effects of Prussian/German military tradition
It's widely felt by military historians that the Prussian/German tradition of decentralized command was an important factor in the success of German armies in WW2. The doctrine played an important part in the successful careers of men like Rommel and Guderian.
A paper prepared for the USAF in 1994 sums this doctrine up:
Army Regulation 487 outlined a number of general principles to be
followed, but no formulae. For example, the German operational
doctrine de-centralized the operational leadership, and not only
allowed, but insisted that junior officers would possess considerable
initiative in command.
http://www.dtic.mil/doctrine/doctrine/research/cmc.pdf
5. Need for Quick Victories (and post-war "spin")
The nazi state needed quick victories, both because Britain and France were better equipped to fight a long war than Germany was, and because Hitler felt WW1 had proved that a long draining war was dangerous for morale on the home front. This meant that officers who offered bold and daring solutions got Hitler's ear. When daring paid off, in the early part of the war, German officers like Guderian and Rommel were able to claim credit. Disasters, especially those later in the war, could be entirely blamed on Hitler. This was certainly the spin that senior officers put on things after the war, in their memoirs. And this helped to add to their reputations. I don't say this in any way as a Hitler apologist but to offer up the suggestion that having Hitler and his most loyal cronies out of the way, was certainly convenient for wehrmacht memoirists after the war.
6. Convenient for the Allies
Paying tribute to the skill of your opponent is a classic tactic if you need to distract attention from your own shortcomings. It was a technique used by the British in the disastrous run of defeats in France, Norway, Greece, Crete and North Africa.
It was one of the tools in Churchill's kitbag when he was forced to explain before parliament and a domestic audience the lamentable performance of the British army in Africa in 1940-42. He often praised Rommel and hailed him as a "great general". The notion of the "Desert Fox" was useful to British commanders. While Churchill was privately furious with his own generals, in public it was a sort of an explanation for why the British, superior in men and tanks, were doing so badly against Rommel.
As a result, Rommel, and other German generals came out of the war with burnished reputations