No. If someone really has pneumonia they are not likely to have the energy or aerobic endurance to play and sport while ill.
Not Advisable. Besides physically limiting your ability to perform at your best, you increase the risk of more damage. With elevated white counts from infections, the spleen may be enlarged and at risk to rupture if hit. Playing when impaired, can increase your risk of injuries. Symptoms from the pneumonia could mask more serious injuries that result from play. If contageous, you'll likely spread the illness.