When you're reading the time AM stands for Anti Meridian, this means before Meridian because the sun hasn't reached the meridian line in the sky from your perspective.
PM stands for post meridian because the sun has apparently gone past the meridian line.