My 8 mnth old baby has been diagnosed with bronchial pneumonia please tell me how it happened?

Exposure. Exposure to pathogen, inhaled, reach the lungs causing pneumonia. Immune system is still developing, no longer with the antbody he loaned from you in the first 6 months. Make sure baby gets schedule immunization (the first 2 years are critical, bulk of vaccination are given during this time, specially the first year). Get the 2 influenza vaccination this fall (4 weeks apart).