If you are not a German citizen, you do not need a tax number.
(though you’ll might need it for your own bookkeeping).
If you are a German citizen you must indicate your tax number on each invoice. If you don't have a tax number yet, you can contact your local financial office (Finanzamt). It's very easy and doesn’t cost a thing.