The A-bomb section of the FAQ focuses more on the effects of the bombs on the two cities than on why they were selected, so I've gone and got you three posts from u/restricteddata's blog that do deal with the matter of targeting.
This post deals with targeting criteria in general, and should answer the question as posed.
This post focuses on Hiroshima and why Hiroshima in particular.
This post focuses on Kokura, the intended second target, and some reasons why the second bombing mission aborted their run on Kokura and went for Nagasaki instead.