Get your license, registration, and insurance out before they get to your window
It's a safe bet that the officer doesn't want to spend any more time at this stop than you do, and since you know you've gotta get your info out anyway, why annoy the officer by waiting?
Caveat: As Matt putts it, "If you know your registration and insurance are buried somewhere, wait with your hands on the wheel until the officer is there. Communicate that it’s in the glovebox, and get permission before you start digging around."
Kiss ass before they go back to their car
Timing is important here, and you want to make sure you're following these tips before the officer goes back to his or her car. That's when they run your info and decide whether or not to write a ticket. Once it's written, it's in the system and an officer has no power to rescind it, no matter how charming you are when they hand it over. Tearing a ticket up only happens in movies, people.