Can an advisor use student's data for journal publishing without prior consent?
A paper should not be published without the consent of all the authors.
Collecting and processing data may or may not make someone an author; it depends on the details and the discipline.  We cannot evaluate this for you.
If you live in a jurisdiction where data is not protected by copyright law, then technically anybody who gets a copy of your data can publish that data wherever they please.
https://law.stackexchange.com/questions/11359/can-you-copyright-data