Differentiate "an" and "am" in usage. (at) --da ist ein Mann "an" der Tür. --- Die Hochzeit ist "am" Mittag. ------ 1st sentence uses "an," while the 2nd one uses "am." Why???
It is a contraction. Unlike English, which generally indicates a contraction with an apostrophe (do not -> don't), German simply merges the words. "Am" is a contraction of an + dem (at the, on the). This contraction only occurs in masculine and neuter, not in feminine. So we still have "an der" for the feminine. Most prepositions can contract with articles (ueber + das = uebers, von + dem = vom, zu + dem = zum, fuer + das = fuers).
"Am" is the contracted form of "an dem". In many contexts, the contracted form "am" is preferred and the uncontracted form "an dem" is only used for special emphasis.
In the second sentence, you can't use "am" because "Tür" is feminine and thus the form "an DEM (= am) Tür" does not exist. It has to be "an DER Tür", and an + der can't be contracted. If you used a masculine or neutral noun instead of "Tür", you could use "am" in the first sentence. E.g. "Fenster" is neutral, so you could say: "Da ist ein Mann am Fenster."
In general, times of day like this, require the article-- e.g. am Morgen, zum Mittag, am Nachmittag, am Abend, in der Nacht. I don't think there is a general requirement to have an article, but articles might be used a little more than in English. These are the kinds of peculiarities of language that you just have to memorize.