You may have a condition called pleurisy. Pleurisy is inflammation of the lining of the lungs and chest wall. It often is triggered by a viral infection.
This pain can be quite severe at times and is often worse with deep breathing. It is treated with anti-inflammatory medicines.
If your pain doesn't begin to improve, or if it gets worse I would recommend you see your doctor.