1 Collapse of the lung (pneumothorax) 2  Pneumonia causes a sharp chest pain that often gets worse when you take a deep breath or cough.  Swelling of the lining around the lung (pleurisy) can cause chest pain that usually feels sharp, and often gets worse when you take a deep breath or cough.