The best strategy is to ask the child's parents what she's into right now. If she's obsessed with princesses, is there something she doesn't have yet that she'd like to add to her collection? I think you can't go wrong with a book or a coloring book on the subject.
A lot of gift givers who don't have children choose toys that are not appropriate for the recipient's age. Pay close attention to the manufacturers' age recommendations. They are usually pretty accurate.
When in doubt, steer away from toys that are noisy, messy or otherwise obnoxious. The five-foot-tall stuffed dog or Baby's First Drum Set may be a bit much!
"Collect them all" can be a recipe for disaster. If you don't know what toys the child already has, don't buy anything that requires other parts to be fun. And don't buy a video game or DVD if you're not sure if they have the hardware to play it.
Try a magazine subscription, a zoo membership or movie tickets. Those always fit perfectly.
Go to a local toy store and ask someone. Employees in the smaller stores tend to know their merchandise well and can often make great suggestions for appropriate gifts. Some will even wrap the gift for free. It's good to support small, local businesses, too!
And always, always get a gift receipt so the parents can swap it if it's not quite right.