We know that he was very talented but he was also hardworking since even Dumbledore mentioned him being one of the best students in Hogwarts history. This would basically mean that he got the best grades in at least 10 O.W.L.'s (if not all of them) while being prefect and Head Boy. He also explored dark magic at the time and by the end of his schooling he knew almost all areas of magic to the same point as professionals did. How could he manage all that? Did he spend most of his time in the library or what?
Most likely, Tom had studied a lot.
It’s very likely Tom studied a lot while he was at Hogwarts. He was described as being thirsty for knowledge, which implies that not only was he naturally talented, he also worked at gaining more knowledge.
“As an unusually talented and very good-looking orphan, he naturally drew attention and sympathy from the staff almost from the moment of his arrival. He seemed polite, quiet and thirsty for knowledge. Nearly all were most favourably impressed by him.”
- Harry Potter and the Half-Blood Prince, Chapter 17 (A Sluggish Memory)
He had gotten top grades in every examination he’d taken, which is further evidence that he was a dedicated student.
“He reached the seventh year of his schooling with, as you might have expected, top grades in every examination he had taken. All around him, his classmates were deciding which jobs they were to pursue once they had left Hogwarts. Nearly everybody expected spectacular things from Tom Riddle, prefect, Head Boy, winner of the Special Award for Services to the School.”
- Harry Potter and the Half-Blood Prince, Chapter 20 (Lord Voldemort’s Request)
Tom also said he was trusted because he was a model student.
“It was my word against Hagrid’s, Harry. Well, you can imagine how it looked to old Armando Dippet. On the one hand, Tom Riddle, poor but brilliant, parentless but so brave, school Prefect, model student; on the other hand, big, blundering Hagrid, in trouble every other week, trying to raise werewolf cubs under his bed, sneaking off to the Forbidden Forest to wrestle trolls.”
- Harry Potter and the Chamber of Secrets, Chapter 17 (The Heir of Slytherin)
From what we know of Tom’s achievements, and how his teachers and peers perceived him, he almost certainly studied heavily.
I believe that examples from real life can shed some light on this.
As you will certainly remember from school, there are a few children who struggle to learn even the basics of whatever is being taught to them, and a few students who very quickly master everything the teachers have prepared for them (when I was in school the latter group were called "brains"), with the vast majority of students falling somewhere between these two extremes. Some students in the latter group grasp things so quickly that they hardly need to study at all.
In the books, Dumbledore clearly states—in Chamber of Secrets and Half-blood Prince—that Tom Riddle was at the top end of the scale during his Hogwarts years. Remember also that he had been making use of his magical abilities, without any schooling, prior to his attendance; the practice seems to have done him well.
Aside from what we might call native ability, there is the desire to learn. A lot of children in real-life schools regard their time there as something to be endured, and the knowledge taught there as a bunch of junk with no practical value. (Insert your favorite meme about not using algebra today, here.) Once the tests are passed, these students appear to evict the unwanted knowledge from their heads. But there are a handful of kids who take a genuine interest in the topic (yes, even with the stuff the rest of us find boring) and approach the topic with the intent to thoroughly understand it.
I myself taught computer literacy at the local high school, and there was a marked disparity of ability and interest in learning among my own students. Some students, working at their very best, took three days to complete an assignment that other students could knock off in half a class period. Some students paid attention and did the work assigned to them, while others behaved more like apes than humans.
In the case of Hogwarts, we can see that Ron is an example of someone for whom schooling is a form of mild torment, whereas Riddle and Hermione clearly showed up with the intention to learn; in Sorcerer's Stone we learn that Hermione has already read every word of her school books before she first set foot on the Hogwarts Express, and in Half-blood Prince we are told that Riddle was sorted into Slytherin the moment the Sorting Hat touched his head.
And as any adult will tell you, there can be a lot of overlap between the bright students and the ambitious ones, and the result is a model student. They have talent, so everything comes easier, and they have ambition, so they put more effort into it.
It doesn't take a canon source to see how Riddle was pushing the known bounds of magic even during his time at school. If he learned everything in half the time it took other students to learn—a completely realistic assumption—he had plenty of time for other things.
Riddle described the way he was seen as "poor, but brilliant, parent-less, but so brave, a school prefect, a model student."
This shows us that he did well enough to become a Prefect;
"When I first met young Mr Riddle, he was a quiet albeit brilliant boy, committed to becoming a first rate wizard. Not unlike others I've known. Not unlike yourself. If the monster existed it was buried deep within."
—Horace Slughorn regarding his first experiences with Tom Riddle
This shows us he was absolutely committed to doing well.