The German law has not foreseen any legal entitlement to work from home for the employees. However, the employer is responsible for workplace safety. So employees can work from home so if their employer agrees. In case that is not a viable option, everyone in the workplace must keep a safe distance or wear masks. Talk to your superior and inquire about feasible health-related measures. Sometimes, “home-office” as an option is regulated in firm-level or a collective agreements.
If your employer ignores employees' safety and well-being, speak to the works council in your company or inform the Health Office (“Gesunheitsamt”) in your area. You can find the proper Health Office via Behördenwegweiser.