I don't suggest that you tell either one that they need to stop talking completely. For one thing, it's possible that this is simply a friendship, not anything romantic. For another, teenagers tend to find things more appealing and interesting once they are forbidden. Since they are in the same school, they'll be seeing each other in person frequently -- a ban on communication becomes either somewhat awkward, or incredibly tempting (for one or both)
However, it is very reasonable to set down some rules about when and how much they can chat. For example, you might allow him free time for an hour before bed, during which he may call or chat with her. Late-night chats are not appropriate, however, since that cuts into his sleep. Outline the schedule in advance and be clear that this can escalate if his grades do start to suffer (for example, less chat time is allowed, fewer outings, etc.)
You could also consider inviting her over to your house so they can study together, which gives them some "together" time but in a supervised, structured fashion that also emphasizes the importance of academics.
I do suggest that whatever structure you put in place should be universal: if he is not allowed to text this friend after 8pm, he is also not allowed to text other friends. This will reassure them both that it's not their relationship that is motivating the rules, it's his grades and academic performance.