Was that a mistake since they're in 3 weeks from now? Should I have picked a sooner date?
I'm afraid so. It's not a huge mistake and it's not likely to be a problem, but it's not ideal to be unavailable for two weeks without having a valid reason why. If you're in the middle of exams or huge project deadlines, you should have given that as the reason why you're not available sooner but you can discount the rest of this post.
What the recruiter was actually asking was for moments when you're available to talk. As you're a student your response should have been something like:
My school schedule is very packed at the moment but I'm free on Monday mornings and Thursday afternoons so those moments would be ideal. I can also make time for a call on other days1. if that doesn't work for you. I'm also available in the evening after 1700.2
In general, when an interviewer asks for scheduling a date based on your schedule, what's the best approach to handle such a situation?
There's no universal answer. It depends on whether you're currently employed or studying and how the recruiter specifically worded his question. Usually you'd say that you're available on most workdays and would list exceptions such as days when you're in a lot of meetings or moments when you're travelling. A phone interview is usually short enough that it's not too much trouble to fit it into your day.
Now, none of this means that you screwed up or should worry. They know you're a student and new to the workplace so you will be cut a lot of slack when it comes to stuff like this. Because of that you can email them back and say that you realised they meant to check your availability and give them a variation of what I wrote above. As long as you're apologetic about the confusion, the fact that you realised your mistake will be a positive sign. That said, the fact that you asked if the days were appropriate in your mail might be enough for them to realise that you're new to this and cause them to write back asking if you're available sooner. You didn't commit a real faux pas so you don't need to write back.
As for requiring time to prepare, I'll direct you to my answer on a related question. The gist of it is: "don't worry if you're not immediately available but don't build in an unnecessarily long buffer to do unnecessary amounts of prep."
1 Assuming that you don't mind skipping an hour of class. If you do, instead specify the gaps in your classes if you have any, even if they're only an hour long.
2 Specify the days you're available if you have late classes.