Tokyo was Japan's capital. Why didn't the US choose Tokyo to demolish with Atom Bomb?
Bonus Question: What factors decided to bring Hiroshima and Nagasaki on table?
Hiroshima, the first city, was "an important army depot and port of embarkation in the middle of an urban industrial area. It is a good radar target and it is such a size that a large part of the city could be extensively damaged. There are adjacent hills which are likely to produce a focussing[sic] effect which would considerably increase the blast damage. Due to rivers it is not a good incendiary target. (Classified as an AA Target)" . There were also four other possible targets: Kokura, Niigata, Yokohama, and Kyoto. There were three criteria for choosing targets:
- The target was larger than 3 mi (4.8 km) in diameter and was an important target in a large urban area.
- The blast would create effective damage.
- The target was unlikely to be attacked by August 1945. "Any small and strictly military objective should be located in a much larger area subject to blast damage in order to avoid undue risks of the weapon being lost due to bad placing of the bomb." 
The first source states:
The possibility of bombing the Emperor's palace was discussed. It was agreed that we should not recommend it but that any action for this bombing should come from authorities on military policy. It was agreed that we should obtain information from which we could determine the effectiveness of our weapon against this target. 
Tokyo was considered as a target, but it was not of as much strategic value as other cities. If Japan were to be invaded, it would be from the south and Tokyo was not in the south. With the exception of Niigata, all of the targets were in the south. Kyoto was eventually dropped from the lists because the US secretary of war had honeymooned there. It was replaced by Nagaski, which was eventually chosen for the second bomb.
The U.S. likely did not target Tokyo for the atomic bomb strikes as it was the seat of the Emperor and the location of much of the high ranking military officers. These are precisely the people you do not want to kill if you want to negotiate a surrender, as they are the people you would be negotiating with.
The U.S. decided to drop the bombs onto military industrial targets and centers that had significant military utility such as ports and airfields. Nagasaki was actually a secondary target, being a major port. Inclement weather kept the Bockscar from dropping the second atomic bomb on Kokura.
From the notes of the first Target Committee meeting (spring 1945)
Tokyo is a possibility but it is now practically all bombed and burned out and is practically rubble with only the palace grounds left standing. Consideration is only possible here.
The same was true of most Japanese cities. From The making of the atomic bomb.
The committee had refined its qualifications to three: "important targets in a large urban area of more than three miles diameter" that were "capable of being damaged effectively by blast" and were "likely to be unattacked by next August." The Air Force had agreed to reserve five such targets for atomic bombing.
Most noteworthy is that Kyoto was at one point the top target
Kyoto-This target is an urban industrial area with a population of 1,- 000,000. It is the former capital of Japan and many people and industries are now being moved there as other areas are being destroyed. From the psychological point of view there is the advantage that Kyoto is an intel- lectual center for Japan and the people there are more apt to appreciate the significance of such a weapon as the gadget..
When General Groves brought that to Stimson, secretary of war, Stimson objected
I informed him and told him that Kyoto was the preferred target. It was the first one because it was of such size that we would have no question about the effects of the bomb.... He immediately said: "I don't want Kyoto bombed." And he went on to tell me about its long history as a cultural center of Japan, the former ancient capital, and a great many reasons why he did not want to see it bombed. When the report came over and I handed it to him, his mind was made up. There's no about that. He read it over and he walked to the door separating his office from General Marshall's, opened it and said: "General Marshall, if you're not busy I wish you'd come in." And then the Secretary really double-crossed me because without any explanation he said to General Marshall: "Marshall, Groves has just brought me his report on the proposed targets." He said: "I don't like it. I don't like the use of Kyoto."
Stimson and his wife had been to Kyoto for their honeymoon.
So Kyoto at least, the Rome of Japan, founded in 793, famous for silk and cloisonne, a center of the Buddhist and Shinto religions with hundreds of historic temples and shrines, would be spared, though Groves would continue to test his superior's resolve in the weeks to come. The Imperial Palace in Tokyo had been similarly spared even as Tokyo was laid waste around it. There were still limits to the destructiveness of war: the weapons were still modest enough to allow such fine discriminations.
One (big) reason was because Hiroshima and Nagaski were two cities left in a very small pool which had not been bombed yet. Tokyo, as well as many of Japan's other major cities, had already been heavily damaged by previous bombings. It would not have been as effective to bomb a city that was already mostly destroyed, so these "lesser" cities that were still in tact were selected instead.
Contrary to popular opinion, the nuclear bombing was not really necessary in order to end the war.
Japan was considering surrender from quite some time under some condition linked to the Emperor. But they wished to do so the most honorably possible. One of their hopes was to use diplomatically the USSR against the USA in order to have a better bargaining position. They still had a major army in Mandchoukouo.
USA wished an unconditionnal surrender, but they knew that the japanese would surrender to one of these two conditions : 1 - Keeping the Emperor in power and not putting him in trial. 2 - Military invasion by the USSR of the continental part of the japanese territories.
Then remember that from the japanese point of view there is few difference between a city destroyed by one bomb or by thousands (americans already got air domination over Japan).
Actually, most of the americans chiefs of staff were against the use of nuclear bombs, because they knew it had no real military value in this case. The soviets agreed few monthes before to attack the japanese.
So now that you can see that military considerations are at best secondary, let's think about why the bombs have been used. The main objective was both to test the bombs in a real war, and to frighten the soviets. Do not forget that allied forces thought about the "Unthinkable operation".
If you want to give a good show of force to the world, you need to do a maximum damage on an undamaged target. Nagasaki and Hiroshima were such nice targets. Bonus point, they were also strategic targets as explained by others answers. The destruction of these cities was military pointless, but it would have been useful in a hypotetically and over-emphasized Japan ground invasion.
USA is a democracy, so the bombardments had to be presented as a necessary evil in order to prevent a greater evil. So hitting Tokyo would have been a bad idea, because they needed the political surrender.
Note that, not all parts of the USA state or high level military officers would have known about all these elements. So most of the plans quoted in other answers are legitimate.
As you will see, the main reason Japan was pursuing the war, was because the americans offered peace terms that was knowingly unacceptable to the japanese. Therefore the responsability of hundreds of thousands of americans dead in a full scale invasion would have lied in Washington. Because an unconditionnal surrender would have mattered more...
As the physical, Hiroshima is quasi-flat which is similar to concern Tokyo downtown. Nagasaki is almost same valley town which is ideal to modify Kyoto. Ame phy has to determine explosive power and radiation intensity range on both cases in which cases the most available towns were not yet bombing such as Hiroshima and to Kyoto for sake of the postwar concise. Purely, experimental scale came out bad wrong with a kind of misconduct which is Nagasaki for sorry instead of a most desirable first target Kyoto as ever. Simply, the scale of radiation intensity should be measured with top priority target Tokyo instead of Hiroshima because of US achievement of the succeeding insisted dirty bomb as A-bomb. Of cause, the made-in USA is pluto bomb which has been done at Nagasaki. However, such dirty bomb idea was also proceeded to perform completeness by the only Ame phy. Thereby, Tokyo and Kyoto were supposed to do dropping A-bomb at first instead.
here's my calculation:
100% death radius for atom bomb: 3.6km
50% death radius for atom bomb: 8.8km (extended from the 3.6km)
1945 tokyo population: approximately 3,490,000
1945 tokyo bombing death: approximately 100,000
tokyo area: 2188.54 km2
if US drop one at-bomb in tokyo, it will kill approximately 1.9 times of the total casualty from hiroshima and nagasaki. use atom bomb already against the humanity, so US would choose to drop the bomb in hiroshima and nagasaki, which was a little bit rural but can still drag Japan government's attention. by the way, most of these numbers can be searched on google.