A cough may be caused by inflammation of the lungs or by exposure to allergens, smoke, dust, dry air, cold air, or post-nasal drip (nasal mucus that drips into the back of the throat). If your chest hurts while you cough, you may have asthma or bronchitis.