A comforting text message to send condolences could be: "Hey [name], I just wanted to that that I am so sorry to hear about [name]. He/she was a really great friend to me, and I'm here for you." Generally, a text message should be under 160 characters.
A text message doesn't have to be extremely deep or overly thought out. The sender could try to keep it personal and explain specifically how she was touched by that person in a very general way. The difference between sending condolences through a text versus a letter or something more formal is that the sender doesn't need to go into specific detail.