Veja esta linha aqui,
<option value="><?$student_list['groepid']; ?>"><?php echo $student_list['groepsnaam']; ?></option>
^ see this closing bracket
Em vez de colocar um
<option>
extra no <select>
elemento, em cada iteração de while
verificar se o ID do grupo atual corresponde ao ID do grupo do aluno ou não e torná-lo selected
conformemente, assim:<select class="form-control" name="groep_id" id="groep">
<?php
$q2 = "SELECT * FROM Groepen ORDER BY groepsnaam ASC";
$r2 = mysqli_query($dbc, $q2);
while($groep_list = mysqli_fetch_assoc($r2)) {
?>
<option value="<?php echo $groep_list['groep_id']; ?>"<?php if($groep_list['groep_id'] == $student_list['groepid']){ echo " selected='selected'"; } ?>><?php echo $groep_list['groepsnaam']; ?></option>
<?php
}
?>
</select>