Good balance is dependent on healthy, strong, and functional muscles. Little exercise means low muscle tone and poor muscle function which leads to balance problems. Regular exercise maintains muscle strength and function which also maintains the ability to balance.
I'm sure further studies on bone density and balance will eventually lead to this conclusion, but it will take years as research does. Common sense gets us there much faster!
So if you'd like to prevent balance issues as you get older, continue to exercise and do weight bearing activity (not weights as much as body weight exercises that load the upper and lower body) and you will maintain your balance, muscle strength, bone density, and ability to enjoy an active life as you age. What more would you want?!