Probably not very hard.
Scotland already does all of the things it needs to in terms of political systems, laws and regulations to be an EU member, since it already is one. It would have to take over the tasks that are now done by the U.K. government on its behalf, but otherwise, it would be qualified.
I suspect that it could be done in a year or two (the EU bureaucracy is not known for being swift at anything). It might even get provisional status in the meantime by virtue of its unique status as a recent and former EU member.
Converting to being an independent state would be much harder than joining the EU once it achieved independence status and it worked out all of the necessary "divorce" arrangements with the U.K. And, that job would be made easier than it might be by its already substantial legal autonomy with its own legal system (except for the U.K. Supreme Court), its own legislature, etc.