What do Chinese write on a condolence card?
The link user6065 gave is somewhat misleading. Chinese do not have the tradition of writing a condolence CARD. The wiki how page provided seems to be a machine translation of the English wiki how. So it doesn't mean anything if you want to write its counterpart in Chinese. The second link is about 唁电/唁函, which is a very formal letter or message you write personally after someone's death, to express condolence to the family and friends of the dead. It's not very similar to a condolence card in English context. Only if having very important relationship with the dead, and not able to mourn for the dead in person, can you write a 唁电/唁函. It's weird to write one for the death of a pet, or your neighbor you don't know much about.

To write a well-composed 唁电/唁函, one needs to 遣詞雅正 用語沉肅 不枝詞蔓語 賣弄文采 亦不因陋就簡 有失鄭重.

Knowing all these above, let's talk about how to write a 唁电/唁函.

Start with addressing the person or collective you write to:

-No other words needed.

敬爱的陈旭师母：（incorrect）

陈旭师母：（correct）

Main body

-Main body comprises 4 parts:

-Express your deep sorrow at the news

-Exalt the dead for his good qualities and good deeds, from your memories.

-Express gratitude, for how the dead helped you during lifetime. And you will always remember the dead and his spirit.

-Comfort the family/friends, encourage them.

Appropriate closing

-There are many standard opts for this part.

Your signature, time and date