One of the real joys about writing is when you write a section and realise that, without knowing it, you've set up the situation beforehand. I love it when that happens. But it doesn't always, and that's when you've got to thread through the different strands of the story.
What do I mean by a thread? To use Kissing Mr Wrong as an example, there are several threads to follow through. These are the main ones:
Lu's career. Lu's relationship with her mother. Lu's search for the missing soldier. Lu's relationship with Nick. Briony's relationships. Lu's relationship with her father.
All the way through the story, I'm trying to keep each of these threads present in the mind of the reader. Sometimes it's only going to need the smallest of mentions, sometimes they're going to need a bit of development in terms of plot to get them moving along, but they have to be there and be present.
When I'm reading student writing I sometimes feel that each scene is concerned with only one thread at a time. This is a mistake, as keeping as many threads as you can moving along at the same times adds depth for the reader. It's like painting only using black and white, when the full spectrum of colour is available to you.