Nairobi is obviously very easy to get to from other parts of the country and neighbouring nations. Akamba buses are the best and the only company that runs to a timetable and allows you to reserve seats. They run twice daily services from Western Kenya. I'm not sure if this actually starts in Kampala and then goes from Eldoret in Western (via Jinga, Uganda), or if it just starts in Eldoret. Anyway, from there it takes about five hours to bounce down the potholed road to Nairobi, stopping at Nakuru and Naivasha for you to refocus your eyes and pray your soapstone carvings below haven't been making the jingling, smashing sound you've been listening to for the last couple of hours.
Eldoret Express buses are probably the next best and these run all the way from Kitale to Nairobi (via the same stops). Unlike the Akamba buses, which have their own office in each town, these can be found in the local bus park and set off whenever they're full. There are also matatus and share taxis that run from all large towns which are faster but not really as comfortable because you never get a full seat to yourself.
There is only one passenger train service running in the whole of Kenya. This is the overnight train (leaving at around 2000hrs) between Nairobi and Mombasa. The price of a second class bunk in a four bed cabin is KSh2100 (about £19/$29) and the only difference between first and second class is that first class cabins only sleep two.
In a lot of areas it's perfectly safe to walk around in Central Nairobi during the day. Perhaps walking on your own isn't a great idea, but in a pair or a small group it's fine.
After dark you tend not to feel so safe and taking a taxi is advisable. There are always plenty of taxis around, just make sure you agree on a price before setting off. I think there is a KSh200 minimum fare in Nairobi (£2/$3).
There are city buses and matatus that run routes, but I found these a bit more intimidating than in the rural areas I used them, mainly because they use a numbering system rather than just having a piece of plywood in the window with the destination painted on and I didn't want to get on the wrong one (I'm a wimp). There are also quite a lot of motorised rickshaws, especially outside Pizza Inn on the corner of Moi Avenue and Mama Ngina Street (there are plenty of taxis here too). You can fit about three people in these, although they're no cheaper than taxis and probably not as safe.
I definitely wouldn't want to drive in central Nairobi as it's very congested, people tend to walk out in front of cars all the time and matatus are driven by madmen.