My boyfriend was in the ICU 3 months ago for pneumonia. He is better but not 100%. What should he avoid and what should he be doing to get better?

Depends. This depends on the specifics of 1) if he has an underlying condition that predisposed to the pneumonia (like a disease that lowers ones immunity) or one that would be adversely affected by having pneumonia (like asthma) so this really should be addressed by his primary care doctor. Very often after this kind of hospitalization a patient is given discharge instructions, which should be followed.
Recover from pneumon. Pneumonia still kill a lot yearly, even in the USA where we have the best medications (and best ICUs). When a huge organ filled up with blood get infected, it is like the whole body gets infected. A survivor of such a grave sickness loses tons of proteins (=muscles, antibodies.). Replenish by judicious use of proteins and carbohydrates. It may take him many months to recover.