Dictionary.com Word FAQs
Should I write "am" or "a.m." or "AM" or "A.M." (same for "pm")?
Each person should choose a dictionary that will serve as a general guide for spelling and punctuation. By following one dictionary for these matters, your writing will be more consistent. Often, as with the example in this question, the choices are simply variants of each other. This abbreviation translates to Latin ante meridiem 'before noon', so if you want to be a real stickler, you should use the periods after the a and m to denote that it is an abbreviation for two words.