AM is the abbreviation for “ante meridiem“, i.e. “before noon“.
Consequently, PM stands for “post meridiem“, i.e. “after noon“.
Every time before 12 noon is an a.m. time reference and after 12 noon you see time data enriched with a p.m.
It doesn’t matter whether you use capital letters or lower case letters or whether you prefer dots between the letters – every form can be found in daily life: AM, am, A.M., a.m. and so forth.
In the USA it’s very common to use the 12-hour display instead of the more meaningful 24-hour display. Therefore the indicator a.m. respective p.m. is needed.
But some problematic areas exist.
Noon & Midnight reference in the am/pm time format
How would you indicate 12 o’clock NOON (sharp) and 12 o’clock MIDNIGHT (sharp). The answer is that nobody would use a.m. or p.m., because a certain confusion would be included automatically. So just say “Noon” or “Midnight”.
Anyway that is not really appropriate for time tables, e.g. at airports. To write ‘noon’ would look strange.
That means that such timetables, especially such that deal with sensitive time information, are usually written in a 24-hour format. If not, then of course the AM / PM indicators are included. E.g. “The ferry leaves at 11:50 pm and arrives at 5:45 am.”
To avoid any ambiguity one should use the 24-hour format. Science and military do it the same way.
And in case that a 12-hour format is used in any timetable, a common way is to avoid 12 o’clock sharp. Instead it’ll be: 12:01 a.m. (standing for 00:01) or 11:59 p.m. (23:59) and so on.
AM or PM without time
If you hear somebody saying “I call you tomorrow a.m.” … then it is meant the he calls in the morning before noon.
And there are simple timetables which omit the am/pm because they are simple and usually span only one day, like daily school or meeting schedules: