What are the causes of chest and back pain when sneezing?

Depends on your age. Generally at young age you are not expected to have any pain. As you get older and tissues are not as strong will cause pain, sneezing, such as cough the produces a lot of force within the chest cavity, and within the spine. This produces stress on the ribs or back and causes pain, with osteoporosis. However the most common cause of back pain is bulging disc which is pushed out more.
Muscle or disc. Usually muscle stain or bulging disc. I would try heat, rest, stretching where the pain is. If conservative measures don't help, talk to doctor about mri.