Without having much to go on, one possibilty is costocondritis.
As the word implies, this is an inflammation
of the rib cartilages. With breathing and therefore movement of the chest wall, this can elicit pain. This condition is usually self-limiting and the pain symptoms are treated with nsaids
, for example).