There was a time in Germany when using “Sie” was fairly standard practice and that you only ever called a small circle of family and friends (including pets) “du”. But this has dramatically changed in recent years as German society has grown somewhat less formal, especially among younger people.
Still even today some Parents chide their children for being a bit too free and easy with their use of “du”.
But just make things a little more complicated, the use of “du” and “Sie” tends to vary across the nation. Berliners and many east Germans are, for example, much more prone to indulge in a little bit of “duzen” than their counterparts in the western part of the nation.
As a rule of thumb you should use “Sie” rather than “du” when talking to an official. In fact, you could be fined if you disrespect a police officer with the informal pronoun.