They mean mostly the same thing. I need to add another option to talk about it properly.
The student asked if he may join the basketball team.
The student asked if he can join the basketball team.
The student asked to join the basketball team.
The may form is reporting a request for permission to join. It doesn't indicate how polite the student was in his request, just that he was at least a little polite, such as if he asked, "May I join?".
The can form is reporting the student asked for the technical ability to join. There is a tendency to confuse this for being polite, because it's written a little more formally than the final version, and polite is generally less common. However, looking at it from how the question would actually be asked, "Can I join?", we see it's the shortest form for the request that isn't explicitly asking for permission.
The final form doesn't indicate whether or not the student was polite or formal. The assumption is that it wasn't a polite or formal request. That having been said, if the student actually did ask, it was probably the 'can' for. That is, "Can I join?" or "Would it be possible for me to join?" rather than "May I join?" It's also possible that the student just declared an interest, such as "I want to join", and it was misreported as a request.
All this having been said, when I was in school, I had several teachers who claimed that the "can" version was the polite version, and to get the points right, one needed to agree with them. I found it humorous that they asserted the 'may' form was archaic, and then wondered why people weren't ever polite anymore. Admittedly, they didn't generally ask about the lack of politeness in the same breath.