It's equivalent to morning vs. a.m.
아침 is used more conversationally, whereas 오전 is used only to strictly mean the time period after midnight and before noon. Unlike what Joong-ho Nam said, 오전 can actually refer to the time PRIOR TO the sunrise as well. 3am is still 오전 3시, not 오후 3시