There are a lot of obstacles to overcome before you can start to work in Germany legally. The cardinal point is the current status of the asylum process. Whether you have a permission to stay or if your application has not been decided yet.
Broadly speaking, you can start working as soon as you are a recognized refugee in Germany.
If your case has not been decided yet, than the situation is a little more difficult, but it is still possible to work. Once you leave the initial reception center after three months you can apply for a job, but there are two authorities (Ausländerbehörde and Bundesagentur für Arbeit) that have to agree with that. Their criteria are quite strict: up to this month they had to make sure that there is no German who would risk to loose his job if a refugee gets it. Also they look for Germans that can do this job first, before they allow a refugee to do it.
Due to the new integration law these requirements have been suspended for 3 years in some parts of Germany. Even though that made it easier to get a job for refugees, it is still not an easy process.
One remark to that: There was a refugee that we wanted to offer an internship in our office (at Mazars), but the migration office took a long time to give their agreement for this refugee to start his internship. We had to go there in person at least three times, because he had no recognized status yet. Especially in Berlin the process seems to be really hard.