1. If she/he doesn't already own a sex toy, you probably shouldn't buy them their first.
2. If you're not sure if she/he has a sex toy or if they'd like one (i.e. if there's any hesitation), don't buy one.
3. If she/he has a nightstand full of them and you've used them together, it's probably safe to take the plunge.
If you've figured out that it's definitely not cool to surprise your special someone with a toy, that doesn't mean toy shopping is out of the question. Rather, shopping together can be a great bonding experience for both of you. In fact, make a day of it: Do some research online, go shopping, see what you like, pick something out that you're both excited about using together and go home to try it out. Just remember to take it slow with lots of foreplay. And here's a tip: When you buy a toy, ask one of the staff for advice on lubes. Not all are created equal, and some shouldn't be used with certain materials (like silicon lubes on silicon toys without a condom—bad, very, very bad).