Many sensory systems use stochastic fate specification to increase their repertoire of neuronal types. How these stochastic decisions are coordinated with the development of their target post-synaptic neurons in processing centers is not understood. In the Drosophila visual system, two subtypes of the UV-sensitive R7 color photoreceptors called yR7 and pR7 are stochastically specified in the retina. In contrast, the target neurons of photoreceptors in the optic lobes are specified through a highly deterministic program. Here, we identify subtypes of the main postsynaptic target of R7, the Dm8 neurons, that are each specific to the different subtypes of R7s. We show that during development the different Dm8 subtypes are produced in excess by distinct neuronal progenitors, independently from R7 subtype specification. Following matching with their respective R7 target, supernumerary Dm8s are eliminated by apoptosis. We show that the two interacting cell adhesion molecules Dpr11, expressed in yR7s, and its partner DIPγ, expressed in yDm8s, are essential for the matching of the synaptic pair. Loss of either molecule leads to the death of yDm8s or their mis-pairing with the wrong pR7 subtype. We also show that competitive interactions between Dm8 subtypes regulate both cell survival and targeting. These mechanisms allow the qualitative and quantitative matching of R7 subtypes with their target in the brain and thus permit the stochastic choice made in R7 to propagate to the deterministically specified downstream circuit to support color vision.