If you are an EU citizen, your driving licence remains valid until the validation of your licence expires.
Driving licences from countries outside the EU are only valid up to 6 months after you have registered for residency. After that you must get a German driving licence, which means that you must take the rather expensive theoretical and practical tests again. Sometimes exceptions are made, and the time limit of 6 months can be extended up to one year.