South Germany being the richer half of the country is actually a very recent phenomenon. Over the course of history, the distribution of wealth has changed a lot, depending on political factors as well as the importance of various technologies and industries. The north used to be very rich due to trading etc. and Hamburg remains a rich city, while the south was very rural and agriculture-focussed up until the 20th century.
For post-war Germany, a good indicator is the "Länderfinanzausgleich". This is a fund into which the richer states (Bundesländer) pay money while the poorer states receive money in the form of subsidies. How much every state gets/pays is determined yearly.
If you look at the timeline of subsidies on the Wikipedia page (section "Finanzvolumen"), then you can see for example for Bavaria ("BY- Bayern") that up until the mid-eighties, they were considered poorer than the national average and therefore got money from the fund. At this point, the manufacturing and high tech industry took off, propelling Bavaria into todays top position.
Northrhine-Westphalia ("NW - Nordrhein-Westfalen), on the other hand, used to be "in the green" after the war on account of their massive coal and steel industry. But here we see a decline in the 80's due to rising competition of foreign steel and coal and the closing of mines and steel mills.
Also, the statistics are a bit skewed due to the fact, that the poorer, former East German states are all in the north, or at least in middle Germany.
But at the moment, it is basically the powerful automobile industry, their suppliers as well as high tech firms (optics, medical technology, manufacturing, etc.) that cement southern Germany's economical lead.