Get the right brand
Does the brand name matter for SD cards? In a word, yes. Inferior cards can fail quickly. But you're not necessarily safe if you buy only brand name stuff, because there is a large gray market that sells knock-offs (it's not just designer purses!). Some cheap sellers merely silkscreen brand names on the inferior junk. I suspect—though I don't know for sure—that some of the fantastic deals online for brand-name stuff could be from questionable sources.
Even with the genuine material, some companies are sloppier than other with their quality control. SanDisk is a trusted brand and seems to be more careful. (If you are curious about this, you can read more in an
investigative report on failed Kingston cards. The report did not speak highly of Kingston's quality control and customer service, even to wholesale customers.)
Get the right class
Not all SD cards can transfer (read or write) data at the same rates. That's why cards with the same storage space from the same company could sell for different prices. SD cards have class ratings that tell you what its minimum transfer rates are. So a class 10 card can transfer at 10 MB per second (great for full HD video recording); while a class 4 can transfer at 4 MB per second (minimally sufficient for full HD recording).
Having said that, you shouldn't necessarily buy the highest class that you see, especially if it costs a lot more. You pay a premium for the fastest cards (class 10 in 2010) for incremental benefits; besides, your device might not be able to transfer data at that speed anyway. Most smart phones, for example, use normal speed I/F bus for their SD slot, which means that they top out at class 6. Class 4 is fine for smart phones. To learn more about classes, see the official
SD docs.
All things being equal, I'd value brand name over class number. How do you know that the off-brand is not pulling your leg? It's not like an independent lab tested and classified their SD cards.
Buy from the right store
If you want to be cautious, buy only from retail stores that you really trust. Presumably, their buyers do a bit more research; and if they don't, too many failed products and product returns will encourage them to discontinue selling the product or ending the relationship with the seller.
If your card fails, it's easier to return it to the actual store. Shipping things back is always a hassle. Also, some credit cards extends warranties by a year. Use such cards for your electronic stuff.
Final tip
Even the best cards by the most trustworthy manufacturer could fail, so back up your data.