Several aspects of the molecular and cellular components of single cells, in this case neurons, can be exploited to determine these connections.
Neurons are also unique in other respects, for example in their polarity.
Most neurons have a distinct morphology and polarity that can be used to help classify them. Since the soma is three-dimensional, it actually has the shape of a pyramid, hence the name. It can have many dendrites on one end, and a single axon that travels to a different part of the brain. These neurons are considered interneurons since they do not communicate with neurons outside of their general vicinity. They are also often inhibitory and release GABA as their neurotransmitter.