Just wanted to post to let you know that due to new regulations as of July 2017, getting a SIM card as a visitor to Germany has become quite difficult. I've heard some reports of people who have been able to work around it, but unlike most European countries, it's no longer a simple matter of walking into a provider's store, picking a prepaid card, and handing over your passport for registration. As of now, at least technically, they are required to verify your German address with an anmeldung, or registration document - something you register for if staying for three months or longer. No anmeldung, no verification, no service!
Word on the street is that O2 stores are less strict about this than Telekom, and that some of the Media Markt/Saturn shops (think Best Buy) will work from whatever address you provide without requiring the registration documents. But on the whole, it's quite challenging.
The good news is, after mid-June, an EU regulation requires that carriers in EU countries permit roaming - which in many cases they've done in a seamless way, so that you can cross from e.g. Austria into Germany with just a blip in service before you're back in business. Given that, my advice is to buy your SIM card elsewhere in the EU if you have an earlier stop, even if it's an airport layover, and keep it on hand when you get to Germany!
Hope this is of use to folk :)