Your choices are
1) use a output buffer and then trim off the extra comma before output
ob_start();
// your loop that outputs content
$code = ob_get_clean();
$code = trim($code, ',');
2) Use a counter
// get # of rows
$rows = intval(get_field('repeater'));
$count = 1;
while(have_rows('repeater')) {
// output row
if ($count < $rows) {
// add a comma if there are more rows
?>,<?php
}
$count++;
}