What determines the physical location of differentiated cells in an organism?
Cool question. As the other answer mentions, the process is very complex, and we are still learning the relevant mechanisms in organisms other than the fruit fly. But it is considerably well described in the fruit fly which merits a brief summary. 

Since a lot of asymmetric (A-P axis, for our purposes) development occurs pretty early in embryonic growth, whatever drives this pole-specific differentiation must act early. As it happens, it begins as early as maternal ovum (Bicoid mRNA). Using cellular machinery (microtubules, motor proteins), these are concentrated towards one end of the egg and subsequently of the early embryo. Once such an asymmetry in the concentration is achieved, further development genes can take advantage of this patterning by being influenced by downstream signalling. Hence there is a cascade of gene activation downstream, which involve Gap genes, Pair-rule genes and several homeotic genes (see Hox genes) which are also differentially expressed along the A-P axis. They directly control patterns of the organs formed from there. Using a gradient of these genes, further patterning of organs can be similarly achieved (the retina gene would be activated only at a concentration of these genes which is found only at the top and so on).