Pneumonia is a viral or bacterial infection that inflames the lung, which can cause chest pain. The chest pain may be severe sharp, depending on the severity of the pneumonia. However, the chest pain is often preceded with other respiratory symptoms such as chill, fever, coughing.