When can I start to exercise after pneumonia?

As soon as you can. Begin lightly exercising as soon as you are able, and advance as tolerated.
When feel ok. No hard and fast time limit, ordinarily when you are feeling well with no symptoms at rest a person can begin to exercise again, but the specifics depend on your specific situation, check with your doctor.