You can tell that the structures labelled At are axons, or rather axon terminals, due to the presence of the synaptic vesicles.
I think this is a fine photo that's a bit more a clear representation:
PSDs are really just protein aggregates that are thought to facilitate neurotransmitter trafficking. So the structures here make sense. At least, they make sense if you know the tissue you're running in TEM, and you understand that how you cut the samples for microscopy affect the way they end up looking. My only assumption that Den is a dendrite is knowing that axon terminals synapse with other dendrites: they're receiving structures. I'm also somewhat sure the cell body from which the dendrites extend have that characteristically large nucleus.
The other understanding is that these pictures are just snippets of a larger image and you only get used to identifying structures through practice and experience. Rather, the author wants you to see this section and for lack of context has identified the structures for you.