The earlier you produce infantry, the earlier it gets to the front lines. But the Germans have a few problems with constant all infantry builds.
1. Infantry lack the mobility of tanks, which not only slows progress against the Russians, but also decreases Germany’s options late game. Imagine 20 German tanks on Eastern Europe with a few fodder infantry. That force defends Eastern Europe, threatens Karelia, Archangel, Belorussia, West Russia, Ukraine, and Caucasus. (I think). It also helps screw with Allied landings on Western Europe.
2. Germany can only use tanks on the G2 (Germany’s second turn) attack movement phase that were either began on the board or that were produced on G1. Typically, you need about 2 German tanks built on G1 to open up any sort of really interesting possibilities for G2; 5 German tanks is a better bet a lot of the time because it applies more pressure early.
On the other hand, all infantry builds can be very nasty in some circumstances. The key is to use German infantry to soak up casualties and tanks and air for hitting power; the Germans need to preserve their tanks and air because they aren’t producing any more.
When to do one or the other? I would say to use all infantry German build on G1 if you think you can capitalize on some bad luck or mistakes that Russia made, or perhaps if you’re going for a coordinated 4-5 attack with Japan. Generally, though, the additional IPCs you spend on early tanks let you threaten a lot more territory, which makes the game much more interesting. 10 infantry 2 tanks, or 5 infantry 5 tanks are quite different; I’d say a player should try switching between those to see which he/she prefers.
Of course, there are other builds like 1-2 bombers, or Med fleet, but I won’t get into that here.