What causes a sharp pain in my right and left side if my chest while breathing?

Pleuritis. Is a general term for pain when taking a deep breath and can be caused by a number of things, including infections and inflammation. You should probably see your doctor about this to make sure it is not something serious. Anti-inflammatory drugs like Ibuprofen and naproxyn help with pleurisy.
Pleurisy. It sounds like pleurisy. That is an inflammation of the lining of the chest. Anti-inflammatory meds, including steroids, should help.