Foreshadowing builds tension and suspense, particularly when the narrator hints at something ominous. For example, in a story with a crime or some other bad deed, the aligning of events and details to make the execution of the crime possible hint to the reader that the crime is imminent and likely to happen. This causes the reader to read on in anticipation (and sometimes even with a sense of dread) of what is going to happen.
Because foreshadowing hints at events to come, it moves the plot along. That is, foreshadowing reminds the reader that action is forthcoming, even when it is not presently occurring. Foreshadowing links the present scene to future action, connecting plot to other elements of the story, such as imagery and mood.
A "dark and stormy night" is a typical foreshadowing trope that sets the mood for a story. Descriptions of the weather and setting establish a specific atmosphere that prepares the reader for what is to come. Describing a setting using dark and depressing language conveys a sense of foreboding to the reader, who is then mentally prepared for and expects something unfortunate to happen.
Stories with straightforward, chronological narration can come across as bland for readers. In contrast, writers who employ literary techniques, such as foreshadowing, add depth and complexity to their writing. A narrator who drops hints about what's to come not only increases the excitement of a story, but makes the journey there more interesting and pleasurable for the reader.