In order to avoid back pain, avoid sitting for extended periods of time. Sitting is bad for your back. If you must sit at a desk all day, get up every so often and stretch or walk around. Likewise, if you spend a lot of time in the car, take frequent breaks so that you can stretch your legs.
Quit smoking. Among all of its other health risks, smoking can reduce the blood supply to the vertebrae that make up your spine. This loss of blood flow results in degeneration of the disks, making them more susceptible to injury and damage. This sort of disk damage doesn't cause passing back pain but permanent injury.
Sitting down for prolonged periods can be a bad idea for back pain sufferers. Even if you have to sit down all day at work, try to get up and walk around every half hour or so. It doesn't have to be a long walk, but getting up and moving around a bit will do well for your back.