The common causes of rib pain under the chest and pain when breathing are: 1. pneumonia, usually pneumonia involves the pleura and pain when breathing hard. 2. pleurisy, pain when breathing deeply or twisting the body. 3. pericardial effusion, pain in the chest when breathing hard and deep, twisting the body, walking and so on. 4. intercostal neuralgia, pain when breathing hard and deep some times. In addition, there is also myocardial infarction, some times the pain is not obvious, but also will be manifested as pain when breathing deeply.