Of course, one should express genuine sorrow, which may or may not be captured by a prefabricated card. But if one used a set text from such a card, one needs to add a few of one's own words in one's own handwriting. The sorrow should not be despairing (which is the sin of giving up on God), but respectful and tender.
Another aspect of condolence is remembering and appreciating the life now over: a few words about the deceased smile or laugh or kindness. This sparks bright memories that dispel a bit of the harsh darkness of death.
The better condolences also offer hope for the bereft, the bereaved, the grieving; they offer some non-cliched reason to believe your sorrow will lighten, your life will move into brighter places, that this death will one day be swallowed up in victory (if that can be honestly said of the newly dead).
Other condolences are less wise; their vices include overused phrases robbed of meaning through overuse: "earth's loss is heaven's gain," and so on. Better to use your own faltering words than to steal such stock phrases. Yes, "its the thought that counts"--but why not try to match the right words with such sentiments?
Perhaps the most grievous failure in words of condolence is silence--no words at all. Those close to you and your beloved deceased write nothing. Why is this? Perhaps these souls are overwhelmed by the prospect of writing such weighty words. Instead of failing (after all, how many of them are professional writers or pastors or counselors--people who are supposed to know how to do such things?), they succeed by doing nothing, claiming an inability that renders them mute, thus making the bereaved even more lonely in their losses.