Your back pain wen sitting down could be due to a number of things such as poor posture, muscle damage, injury to your backs muscles,putting pressure on your spinal nerves and could be even herniated disc problems.
I would recommend going to see a doctor if the back pain persists but first make sure you have a good comfortable chair and are using good posture when you sit in the chair especially if you're sitting at a desk or on a computer for hours per day.