How long before I can return to work after pneumonia?

Depends. Depends on how bad it was, and what kind of work you do. Usually 1-2 weeks is needed to make sure you are not contagious, and have healed adequately. Pneumonia is serious and potentially deadly, so follow doctors instructions and make sure you have follow up xray to confirm it is completely clear.
Varies. In general people can return to work when the feel up to it. That is when they are not so short of breath, weak etc that work is difficult. For a specific answer depends on the kind of pneumonia, if someone has other underlying health problems and such. It is best to discuss the specifics with your health care provider.