When writing times using abbreviations in a book manuscript, use a.m. for mornings and p.m. for any times after noon. Be sure to leave a space before the abbreviations.
Mary set her alarm for 8 a.m.
On September 11, 2001 at 8:46 a.m., hijackers crashed American Airlines Flight 11 into the North Tower of the World Trade Center.
The couple married on Saturday, July 15 at 2:45 p.m.
This is what the Chicago Manual of Style (the style guide most used by publishers) recommends, so you can’t go wrong.
Note: It is also acceptable to write these abbreviations in small capital letters without periods. But using small caps in a manuscript is complex and generally considered a no-no. So stick with using lower case letters with periods, and life will be good.