The title of the question seems to contradict the text of the question: it's not the "student's data" once it's been published. But there is nuance.
Very broadly speaking, a person gets to be an author on a particular publication when they have done work for that particular publication. If work was done but already published elsewhere, then it is considered work for a different publication. Conversely, if this new publication relies on data that has not been (and is not about to be) published elsewhere, then the data is essentially work for the new publication. Basically, if the student considers the data published, then the student can no longer claim any ownership of the data. And if the student hasn't contributed anything new to this new publication, there is no ethical demand on the professor to share authorship with the student — in fact, there would be more of an ethical demand not to gift authorship to the student.
Now, having said that, it's also true that there are different levels of publication. When the thesis was "published", where and how did that happen? Just in the university library's archive of theses? On the arXiv? Some kind of data repository (zenodo, figshare, dryad)? Or a journal? One of the driving factors behind ethical decisions is the fact that, "in the scholarly arena, [authorship] also forms the basis for rewards and career advancement." (COPE, 2019) So — specifically in their role as a supervisor — the advisor has some moral responsibility to ensure that such rewards can be conferred on the student. At least in fields I've worked in, that basis entirely ignores university library thesis archives, but gives nearly full credit to arXiv publication, and full credit to data repositories and journals. I suspect that every academic field would give full credit to a journal publication, some might not with arXiv or data repos, and most would not credit a library archive.
So here, I'll just give my judgment based on fields I've worked in. If it were me, and the thesis had only been published in the university library's archive, I would not consider the data published, and thus offer authorship to the student. Otherwise, I would consider the data published, and feel ethically bound not to offer authorship to the student, unless they contribute something specifically to the new publication (which could be as minor as helping to write a section).
But there is some gray area here, so I'll also point out that it could be just a dumb move on the advisor's part to push toward the greedy end of the gray. Sole authorship is usually more of a boost to the ego than to the career. On the other hand, the advisor's institution and funding agencies want to see evidence of training the next generation — and joint publications constitute great evidence. Also, future students and collaborators want to know they won't be squeezed out of credit they might deserve. When there's ethical wiggle room, the smart move is to err on the side of generosity.
Edit: I should also emphasize that there's a difference between being an author and being offered authorship. Given the comment below that the thesis was published in the university library, the advisor should have made a good-faith effort to bring the student aboard as an author on the paper. However, it's also true that students who have moved on with their lives will often be unable or unwilling to take on the responsibility of authorship, even with a reasonable amount of flexibility from the other authors. I'm not saying that's what happened here, but it can happen. And if it does, the advisor can't let the research be held hostage, but must accept that they made an honest effort, and the research has technically been published, so the new publication can go forward without the student.
Further reading
Within academia, COPE (Committee on Publication Ethics) is generally regarded as providing a sort of broad framework for all fields. (For example, Springer's, Cambridge's, and Wiley's discussions of authorship ethics link to COPE.) And COPE has put out a document with lots of discussion and links to more discussion on the issue of authorship.