You need to tell MySQL which user to select. Right now, since you have no WHERE clause in your SQL statement, you are selecting all users and then using the first row in that result set.
Now to make the profile display the proper user, your link would need to look like:
$id = (int)$_GET['id'];
$query = "SELECT id, username, iwins, ilosses, ipoints FROM punbb2_users WHERE id=$id";
Just put the user's ID as the value of that GET parameter and you're good to go.
<a href="profile.php?id=1">Bob's Profile</a>