The Gemara in Brachot attributes the "establishment" of Maariv to Yaakov Avinu, based on the pasuk at the beginning of Vayeitzei: VAYIFGA - and he came, stopped at, approached, met, encountered the place... The Gemara then points to a pasuk in Yirmiyahu in which we find G-d telling the prophet that He is "angry" with the People and intends to do to the Beit HaMikdash what He had done to the Mishkan in Shilo, and you (G-d) says, don't pray to Me on behalf of the people, don't bring Me their prayers and joyful song, and don't TIFGA (word with same root as VAYIFGA) Me, because I won't listen to you. P'GI'A says the Gemara, is another term for T'FILA. The pasuk in Vayeitzei mentions KI VA HASHEMESH, for the sun has set, which identifies the time of Yaakov's prayer as nighttime. Hence, Yaakov "established" Maariv.
Ideally, one should daven Maariv (which includes, remember, the SH'MA of the night - a mitzva from the Torah) as soon as it gets dark. If a person has a regular Maariv minyan he attends at a later time (than the beginning of the night) and/or if a person has someone to remind him to daven Maariv, then he may daven at a later time.
Halacha discusses what a person may or may not do when it comes time to daven Maariv - eating, learning, other activities. Majority opinion is that women are exempt from Maariv, but may take it upon themselves. Limited space does not allow for more detail, but ponder this: What's the first thing you want to do at the beginning of a brand new day?