This passage offers some significant lessons, both for Matthew's first audience and for us today.
Asking for a sign after the Lord has already revealed himself is testing him (16:1; compare Ex 17:7; Ps 78:18-20). Pharisees and Sadducees were generally at odds, joining forces only under external duress (compare, for example, Jos. Life 21-22); Matthew reports that Jesus' mission was one such case of duress (3:7).
This passage refers not to those who genuinely fear God yet ask for signs as an assurance of God's promise (Gen 15:6, 8; Judg 6:17, 36-39; 2 Kings 20:8), but to those who seek grounds to disbelieve. Religious leaders had challenged Jesus after other miracles (Mt 15:1-20); the Gospel's first reference to testing (4:1; compare 6:13; 19:3; 22:35) may suggest that the devil is the theological source of their opposition. Now they ignore the signs of a prophet (15:21-39) and demand instead a sign from heaven (16:1). A sign from heaven probably means a sign in the heavens, like those that many people believed presaged the fall of Jerusalem (Jos. War 6.288-91) and the end of the age (compare 24:29-31; 27:45, 51-53). Presumably these leaders ask Jesus to predict a sign in the sky-which essentially reduces them to the level of astrologers or diviners, something forbidden in the Hebrew Bible (Deut 18:10). The religious leaders here contrast starkly with some pagan astrologers who came to worship King Jesus (2:1-12)!
Jesus is giving them a clearer sign than a sign in heaven would be (16:3-4). Jesus' questioners could predict many celestial phenomena with no supernatural inspiration at all; a red sky in the morning, for example, meant that Mediterranean winds from the west would be bringing rain. But Jesus was not interested in predicting events in the sky or using such events to predict the future; they were overlooking an explicit sign that was nearer at hand. The sinfulness of that generation could itself constitute one sign, for many Jewish people understood that a sinful generation would immediately precede the coming of God's kingdom (CD 20.14-15; 2 Baruch 26:12; m. Sota 9:15). The description of that generation resembles Moses' complaint against Israel (Deut 32:5), a generation that had repeatedly tested God in the wilderness and rejected his prophet Moses (Ps 78:18-20).
Jesus' own ministry and resurrection constituted the decisive sign to that generation (16:4). The resurrection was an end-time event (Dan 12:2); Jesus' resurrection was a clear indication that the kingdom time was at hand (Mt 12:39-40).