If you are financing your studies yourself, there is no limit on how many hours you can work or how much money you can earn. However, it is important to note: In Germany, students can work up to 20 hours per week without paying taxes. This limit does not apply during the semester breaks.
If you receive a scholarship you are not allowed to earn more than 400 € per month. If you do, you are required to deduct the amount from the scholarship.