Write their name or know the letters of their name? For my kids, they knew the letters of their name significantly earlier than they could write them.
Both of them could identify (not just name) the letters of their name by about 2 1/2. Writing? Dd was 3. Ds was 4. Ds had a fine motor delay, and his name was about the ONLY thing he could write and even then it was badly. (And his name has 3 letters with diagonals. Poor dd has 4 diagonals and a R. She solved the problem by writing her diagonal letters with curves and doing a lower case r with upper case everything else. And then reversing all her letters to accommodate her lefthandedness.)
Writing words hasn't come nearly as easily for either of my kids. They are truly bothered by the discrepancy between what they can read and what they can write. Ds is in 3rd grade, and I would say that his writing has really just taken off in the last 6 months. (I talked to his teacher yesterday, and he said that ds has excellent spelling and great ideas, but needs work on organization and penmanship. Now there's a surprise!) Dd could theoretically write, but won't try.