If you are resident in Germany you register your address at the local town hall and they give you document called an anmelde bestatigung and, generally speaking, you need this, along with a passport, to open a bank account.
Non-resident accounts I don't know what the procedure is, like.