You could just change the comma to the beginning of the echo in the for loop and implement a condition to check if its the first tag... like this:
<?php
$c='bob sally butch jim';
$tags = explode(' ',$c);
for($i=0;$i<count($tags);$i++)
{
if($i === 0)
{
echo "<a href='#'>" . $tags[$i] . "</a>";
}
else
{
echo ", <a href='#'>" . $tags[$i] . "</a>";
}
}
?>