Cancer treatment can have an impact on your bone density, for example, a woman who has chemotherapy can lose as much bone density in a year as she would have lost in a decade. It's important to maintain bone density, and weight training is one of the best ways to do that.
Simple weight training is helpful. Talk to your doctor about exercises you can do. Even walking or taking stairs are considered 'weight bearing' exercises (compared to something like swimming, where you are not working against gravity).
If you have undergone chemotherapy, talk to your doctor about what weight-bearing exercises would be best for you to start.