Death is an important, serious matter, whereas texts are short, instant, informal, light communications: I wouldn't ever send a text to acknowledge a death, because texts are what I send to arrange going for a beer, to say I'm running late or ask someone to pick up more loo roll - it just seems incongruous. Also, with letters, no matter how old fashioned it is, I like the thought that someone has something that they can hold, revisit, re-read etc.
I always write to someone when I am aware they've been bereaved as a result, even if I am not close to them or am not personally familiar with the person who has died. It's just easier to write a note when you know the person, as there's something concrete you can share with the bereaved etc When it comes to funerals, I ask my Irish friend for the best ettiquette if I'm unsure - do we need to go to our boss' father-in-law's funeral? No. Check.
With close friends, assuming I didn't know their parent so wasn't going for that reason, I would always attend - or send specific apologies if not able to: you don't go to funerals for the person who's died, but to support those who are left behind. If someone asked me not to, of course I would follow their wishes - but in absence of requests, I would always do my best to get there. I also, in common with PP, wouldn't 'phone my condolences - firstly, because you can't revisit a 'phone call, and secondly, when you've been bereaved, you don't necessarily want to handle speaking with people about it, however close, on the 'phone. Even your best friend.
I fully accept I am probably seen as old fashioned in this, though: I also write thank you letters.
I'm sorry for your troubles, OP 