MB 16: And the sun went down on the eve of Shabbos - Meaning that the sun began to set. And in this case it is impossible for him to carry his tefillin home in his hand, because of the holiness of the Shabbos. It is similarly impossible for him to leave his tefillin behind, because their houses of study were in the fields, in a place unguarded to thieves. Therefore, the sages permitted a person to wear them home normally - but he must cover them in order that no one should see him wearing tefillin on Shabbos.
30:5. There are those who say that if one prays the evening service (17) while it is still day, he may not put on tefillin afterwards even if he has not worn them that day.
MB 17: While it is still day - Even if there is much daylight left before sundown, because he has already deemed this time "night" and "the time for lying down," by saying the Shma & the silent prayer (Shmona Esrei) for the evening. If he were to put on tefillin now, he would be going back and making it daytime - which would be making two statements that contradict each other. The Achronim, however, agree that the law is that he is obligated to put on the tefillin without a blessing as long as it is before 3 medium size stars can be seen. If he didn't pray the evening services, even though the community did pray already, this is not a problem at all, and he should put them on with a blessing if it is still day, since he himself has not made those 2 statements which contradict each other. This is if he did not put tefillin on at all that day, but if he already put on tefillin, and now he wants to put them on again, it is not fitting for him to put them on if the community has already prayed the evening services.