It is possible that you are doing breathing exercises too quickly and rapidly. This can cause your diaphragm, which is stretching, to feel a stinging pain. Also, muscle tension can cause this kind of pain.
You need to control your breathing more, do it more calmly and less rapidly. Also remember to have proper posture while exercising.
Also before doing breathing techniques, you can do stretching exercises for your chest and back.