○ 「,」をつけるのは、前の名詞がすでに「だれであるか」が特定されていて説明がなくても分かる場合ですね。
(1) Tom, a friend of mine, came to see me yesterday.
○ 前の名詞が、「だれであるか」が特定されていない場合には「,」をつけることはありません。
(2) Jerry, this is my friend Sue.
・・・(from LDOCE on line)
(3) my friend John Harris「私の友人ジョン・ハリス」
・・・(from プログレッシブ英和中辞典)
○ 関係代名詞の「制限用法」と「限定用法」の違いを考えれば簡単に理解できることですね。
(4) The boy (whom) we saw in the park yesterday is a good friend of mine.
(5) John, whom we saw in the park yesterady, is a good friend of mine.
○ お尋ねの英文です。下のどちらかを使った方が良いでしょう。
My friend Tom is good at swimming.
or
Tom, my friend/a friend of mine, is good at swimming.
補足
分かりやすい説明、ありがとうございました。こんなふうなかんがえかたができるなんて知りませんでした。