The Question:
I see many shuls have a minyan for Maariv right after Mincha, but isn't that too early to daven since it's not the time when three stars come out?
The Answer:
Hi, thank you for your submission and feedback! To clarify, we need to define four critical times: 1) "Yom" (day), which is the time before sunset; 2) "Shekiah" (sunset), the exact moment when the sun dips below the horizon; 3) "Bein Hashmashos" (twilight), the period following sunset when it's uncertain whether it's still day or already night; and 4) "Tzeis Hakochavim" (nightfall), the time when three stars become visible in the sky, marking full night.
Your question can be understood in two ways: whether it's permitted to daven Maariv BEFORE sunset or AFTER sunset (but before Tzeis Hakochavim). Since these are separate discussions, we'll focus here on the latter case, which I believe is what you're asking: davening Maariv after Shekiah but before nightfall, Tzeis Hakochavim.
The Gemara in Berachos (27a) discusses the latest and earliest times to daven Mincha and Maariv. According to all opinions, Maariv can be recited after Shekiah. That Gemara is only discussing Maariv; however, the biblical commandment to recite Shema every evening, the Gemara (2a) says, can only be fulfilled after Tzeis Hakochavim.
Some might think, "I'll daven Maariv after Shekiah and then repeat Shema after Tzeis Hakochavim." While this approach fulfills the Shema requirement, ideally, the brachos of Shema should be recited with Shema itself.
However, the Shulchan Aruch (235:1) rules that if someone davens Maariv before Tzeis Hakochavim, they have fulfilled their Maariv and brachos obligations but must repeat Shema later. The Mishna Berura (235:12) adds that it's praiseworthy to daven Maariv after Tzeis Hakochavim to ensure Shema is recited with its brachos at the proper time.
In short, While davening Maariv right after Shekiah is permissible (with a repeat of Shema after Tzeis Hakochavim), it's preferable to wait until after Tzeis Hakochavim to have Shema along with the brachos at the ideal time.