Limit caffeine, carbonation, alcohol and salt.
I was relieved to find I was already avoiding all of these! If you're wondering why you should avoid them, this Huffington Post article tells you why. Another thing it points out is that eating way too much protein (an uncommon problem) can also be bad for your bones (but so is eating too little protein, so be sure to eat a balanced diet.)
Do weight-bearing exercise.
Any exercise where your bones have to hold up your weight (e.g. running) will strengthen your bones, although lifting weights in particular is really great for bone health.
Eat enough calcium.
This one's pretty much a no-brainer, but I thought I would touch on non-dairy products. I'm lactose intolerant, so I know it can be harder to get calcium if you don't eat dairy, although it's definitely achievable. Most dairy-alternative milks contain calcium (more than dairy milk, actually,) and you can also find calcium in these foods.
Don't forget magnesium or phosphorus.
While a lot of emphasis is placed on getting enough calcium, in order for calcium to be absorbed properly, both phosphorus and magnesium are needed. Phosphorus is found in "protein foods" (meat, cheese, nuts, fish etc.) and magnesium is found in green leafy vegetables, nuts and even cocoa.
Get some sun.
Or, in other words, vitamin D. If you can't get enough in your diet (although it's in tuna, eggs and fortified foods,) consider taking a supplement.
Get your vitamin K.
For the longest time, I thought vitamin K just meant potassium (although, that's good for your bones too,) but it's actually a nutrient you can find in foods like green leafy vegetables.
Smoking is bad for just about every part of your body, including your bones.
Evaluate your prescriptions.
Certain long-term medications can cause bone loss, so be sure to talk to your doctor if you're concerned (if you have family history of osteoporosis, you may have to take a different medicine or add supplements to your diet.)
Omega 3s aren't just good for your heart: they're also linked to bone health. Fish is a great source of omega-3s and has vitamin D to boot!
An apple a day...
Although there's not a ton of research (yet) on the subject, I've seen multiple sources that boron (which can be found in apples) supports bone health. With all the other health benefits apples provide, this one is a no-brainer.
Bonus: Experiment with chia.
If you don't know what foods to eat for optimum bone health, try adding chia to your diet. Chia has a lot of omega 3s, calcium, phosphorus and magnesium.