In The Dark Knight Rises (2012) when Miranda Tate enters Bruce's mansion for the first time after Bruce loses all of his money, the power goes out and they are left in the dark. This is foreshadowing.
This is foreshadowing Miranda's involvement with Bane. During multiple scenes in the movie, when the lights go out, this is to signify Bane's involvement in that scene (eg. the famous "oh you think darkness is your ally?").