I would go with the SB800. The SB900 has had issues with over heating. Check out some online reviews. Most of the time you will be shooting in TTL and distance is calculated for you.
depends on your power needs and your money supply...SB 900 is more expensive, both will do a very good job at almost everything, 900's advantages include ability to zoom to 200mm compared to 105/135mm for the 800, and more power (higher guide number). Otherwise they're both very good...the previous post overlooks the 900's self regulating overheating shutoff protection..... would have liked to have had that on my 800 last summer when I apparently burned it out (Nikon fixed it under warranty, but lost a bunch of wedding photos I would like to have had....
SB800 is no longer available new. The SB900 is way better and worth the extra cost. If you don't need all the extra features, you can always buy a SB600 or even SB400.