In the 1977 movie, Star Wars Episode IV, orders to excecute the princess are given several times. Once an order to execute her "immediately" but still she was not executed and was later rescued. Why was she not executed?
According to the film's official junior novelisation, Vader prevented the execution so that Leia could act as bait, leading the Empire to the Rebel Base on Yavin.
Again, Vader remained silent, but he thought, If we’d done things your way, Princess Leia would have been executed by now. And how would that have helped us find the Rebel base, Grand Moff Tarkin?
Later in the film, Tarkin and Vader have a conversation about recent events. We learn that their apparent failure to prevent Luke, Leia, & Han from escaping was in fact a carefully crafted plan of Vader's:
TARKIN: Are they away?
VADER: They have just made the jump into hyperspace.
TARKIN: You're sure the homing beacon is secure aboard their ship? I'm taking an awful risk, Vader. This had better work.
I think Lucas was employing a plot trope called, Always Save the Girl. The effect of having a wait associated with the character moves the plot along.
There are also other ways to look at it: aside from the dramatic effect of waiting, there may have been bureaucratic obstacles (the Empire is a government entity after all). And the timeline of events issue raised by a previous poster. Additionally, Darth Vader is powerful in the ways of the Force and could possibly foreseen future events regarding the escape of Leia and the discovery of his son.
Also, the movie and the story were written in an earlier time when people were more innocent than we are today. Look at American Graffiti; another great movie by George Lucas.
To elaborate on the great point about Always Save the Girl made by KillerZ, Leia was the entire plot device for Star Wars Episode IV: A New Hope. The reason the story takes place at all is because of Princess Leia. C-3P0 and R2-D2 seek out Obi-wan Kenobi because Leia asks R2-D2 to (C-3P0) is really just pulled along for the ride. While on their way to finding Obi-wan, the two droids are captured and subsequently sold to Owen Lars, Luke's uncle and caretaker. Through R2-D2 escaping custody of its new owners, Luke is led into meeting Obi-wan. R2-D2 plays the entire cry for help message to Obi-wan. This instigates Luke learning about his real father, the Force, and ultimately being taken a long to save Princess Leia.
If Leia were to be executed during this time, the driving force behind the story of A New Hope would have ended. There is a crossroads now. Yes, this can happen and the story can continue on in another direction. Or No, this cannot happen because then George Lucas can't tell the story he intended to tell. This ties into part of the origins of Star Wars in that this is almost exactly the same driving plot device as The Hidden Fortress. A very big influence on the creation of Star Wars, The Hidden Fortress follows General Rokurota Makabe, Tahei, and Matashichi as they escort their Kingdom's Princess safely back from enemy territory. The Princess (in Makabe's case) and her gold (in Tahei and Matashichi's cases) are the plot devices for this story. Had the gold been handled differently, or something different happened to the Princess, Kurosawa would have had to tell a different story.