Use the following PHP code in a custom token to display the comment author's name as a link to either their homepage or their user profile. If they didn't enter a homepage URL and they're an anonymous user, or if accessing user profiles is not allowed, the comment author's name will be displayed without a link.

Set the 'token type' to 'Comments'.

$comment = $data['comment'];

$name = $comment->name;
$homepage = $comment->homepage;
$uid = $comment->uid;

if (empty($homepage)) {
  if ($uid > 0 && user_access('access user profiles')) {
    return l($name, 'user/' . $uid);
  }
  else {
    return $name;
  }
}
else {
  return l($name, $homepage);
}