How does Shakespeare use images of light and darkness in Act 2, Scene 2 of Romeo and Juliet to foreshadow the dangers to come?
We see the biggest contrast between light and darkness in Romeo's first speech in which he compares Juliet to the sun and tells her to reject the moon. The images of the sun and moon are images of day and night respectively and thus serve as images of lightness and darkness. These images represent both beauty and their love, but also foreshadow their upcoming deaths.
These images are used to praise Juliet's beauty and also to tell her to cast off her maidenhood, an activity that is usually performed at night, under the moon. We see Romeo praise her beauty in the line, "It is the East, and Juliet is the sun!" (2-3). We see him tell her to cast off her maidenhood in the lines,
Her[the moon's]vestal livery is but sick and green,
And none but fools do wear it. Cast it off. (8-9)
While these images serve to paint Romeo's amorous and lusty emotions, since death is like an eternal sleep, or an eternal night, the allusion to nighttime can also serve to foreshadow their upcoming deaths. As we see above, the reference to light in this scene is always used to refer to Juliet's beauty. A second instance of this is seen in one of Romeo's later lines. After Juliet says "A thousand times good night!," Romeo says to himself, "A thousand times the worse, to want thy light!" (162-163). The statement of wanting her "light" refers to wanting, or desiring, everything that is good about her, especially her beauty. Since light refers to beauty, we also know that it is symbolizing their love. In addition, since they eventually consummate their love at night, a hasty act that helps to lead to their deaths, we can also see that nighttime is symbolizing and foreshadowing their deaths. Not only that, since they part at night, we can see that the reference to darkness, or night, can allude to their upcoming deaths, or eternal nights.