If I wanted to say "She is his only friend" I could say 「彼女だけ(が)彼の友達だ」or 「彼は彼女しか友達がいない」right? What about 「彼女が彼の唯一の友達だ」? How common would that be?
唯一 is relatively rarer and more difficult than しか～ない or ～だけ, and it's not a word kindergartners are likely to use. But once you've become a teenager, it can be safely used both in formal and casual settings. Even when used in casual conversations, no one would think it's particularly stiff, archaic, poetic, etc.
In my opinion,「彼は彼女しか友達がいない」describes that she seems to be the only one person you can call as his friend because of your observation (he is in a club and she is the only one person he knew before his joining or for several months you have not observed he was talking with anyone except her).
On the other hand,「彼女だけ(が)彼の友達だ」and 「彼女が彼の唯一の友達だ」sound like you are emphasizing the authenticity of friendship between him and her more than 「彼は彼女しか友達がいない」because you have observed the friendship moment such as she helped him pass the exam or homework and so on so forth.
The word, 唯一 is a combination of Kanji 唯 meaning "only" and 一 (いち) meaning "one", and it means "only" and "single / singly".
Like "彼は私の唯一信頼できる友人だーHe is the only friend I can fully trust on." "私が今唯一言えることは - Only what I can say now is ..." "唯一私の手元に残っているのは… - Only the stuff left on my hand is ...", 唯一" isn't any big word, though "しかない＂ "...だけ" might sound more colloquial by comparison.
Of course, you can use "唯一＂in both speaking and writing without too much reservation.