Why is my rib on the left side sometimes sore?

Many causes. Most concerning left sided pain is associated with the heart, but many other causes include trauma, costochondritis, anxiety, stress, gastroesophageal reflux, and sometimes from abdominal organs such as bowel. Stomach , gall bladder, etc. In the chest pleuritis, pneumonia, pulmonary embolism, collapsed lung etc. You should consult physician for physical examination and testing if appropriate.