How could I forget Himeji!? definitely stop off there for half a day on the way to or from Hiroshima if you can. In fact I think Himeji is much more interesting than Osaka by day.
In Osaka, if you like onsen or even if you've never been before give SpaWorld a try. Its open 24/7 except the baths close for an hour each morning to be cleaned. Unwind after a hard night on the town? Or after a day's sightseeing before hitting the nightlife.
http://www.spaworld.co.jp/
There's even a 24 hour "rest" room with big airline style seats you can sleep in. A better bet than Peter-san's all night family restaurant emergency "hotel" option. (or internet café "lodging") if you're really stuck.
The only hurdle is the initial purchase of a ticket from a machine I found. but the staff as usual are very helpful if you ask them.
If you haven't been to an onsen or sentou you've got to try it at least once. It's the most Japanese thing you can do I think.
The nightlife is situated in South Osaka in Dontonburi. (The main JR station is North Osaka)
(unless there's something you especially want to see or do in Osaka, I'd recommend you cutting it out of your itinerary and spending that time in a Himeji day trip en route to Kyoto first night instead. If you've been staying in Tokyo you've already experienced modern Japanese city life. Osaka doesn't have much easily accessable historic things to see, if that's what you're looking for. But if crazy night-life is what you want Osaka has it.There's something to be said about a city where happy hour in bars starts at midnight and you see people going home at 6am on a weekday...)
In Kyoto the main sights are around the edges of the city. get a 1 day bus ticket (500円)and a bus map when you arrive in Kyoto station. The ticket desk is under the station to the East of the underground shopping mall near the Kyoto-eki subway exits. The subway isn't that useful to a tourist but it's maybe worth the extra for the combined ticket depending on where you're staying (1200円 1 day, 2000円 2 day ticket) . If you're leaving luggage at the station the left luggage in the sub basement is better than trying to find a large locker.
Don't mix-up kinkakuji and ginkakuji as I did. Because the sights are so spread out it can take a bit of time going between them if you don't plan (or go to wrong temple!)
At night in Kyoto, walking about the old Gion districts is interesting. If you stay away from the main touristy bit you might even see a Geisha-san hurrying off to an appointment. Yasaka shrine is very athmospheric at night.
If you get a chance before you go orientate yourself using google earth to get a sense of where things are and distances involved in the places you're going to visit.
Bon Voyage, Have a good trip!