This is likely better suited for /r/AskAnthropology than here.
Marriage as an institution almost certainly pre-dates civilization, writing, etc. All the early legal codes (like Hammurabi's) have extensive sections on marriage. Marriage tends to show up it the earliest literature of most cultures. For example the Greek side of the Iliad begins with a wedding, while the plot of the Odyssey hinges on marriage customs.
So it's an impossible question to ask a historian when marriage became an institution. It became an institution in pre-history.