The first mishna in all of Shas discusses reading Shema in the evening, which is the first mitzvah we perform each new day. There is a difference of opinion as to the parameters when Shema may be recited. Rabbi Eliezer says from the time the kohanim (priests) were able to eat terumah (tithes) if they needed to ritually immerse until the end of the first third of the night. The Sages say that Shema might be recited until midnight, and Rabban Gamliel says it could be recited until dawn. On one occasion, Rabban Gamliel's sons came home late from a wedding and had not yet recited the Shema. He told them that they were still obligated in the mitzvah so long as dawn had not yet broken. Not only that, he said, but any night mitzvah could be performed until dawn. (He provided examples of such mitzvos from the sacrifices.) Even the Sages would agree to this, he said, but they said to recite Shema by midnight as a preventive measure so that one should not fall asleep and neglect performing the mitzvah.
In the morning, Shema can be recited starting from the time when one can distinguish between blue wool and white wool. Rabbi Eliezer’s opinion is that one must be able to distinguish between blue and green, and that one must say Shema by sunrise. Rabbi Yehoshua allows Shema to be recited for the first three daylight hours since people of leisure often remain in bed until that hour. If one misses the cut-off point, he should nevertheless recite Shema. While it may no longer fulfill the obligation, it still fulfills the mitzvah of Torah study.