I don't know if there is scope for adjustment (I'd imagine there would be), but my first port of call would be to lubricate the runners & moving parts.
Chances are its been closed for a few months, and road spray containing salt & other grime, may have dried out these moving parts.
I wouldn't use wd-40, but either a spray grease or a smear of LM002 grease and run the sunroof a few times to see if there is improvement. If so, its a cheap fix, if not - then a bit more investigation is required.
Ive been having the same issue, I noticed that on my sunroof the actuator on the left hand side is incredibly loose, haven't yet worked out how to change it or even had a closer look yet but yours may be the same cause, the clunk is when the sunroof glass hits on the metal of the roof
I'm having the same problem with my 00 Mégane Coupé, the sunroof is rattling and loose when closed, but ok when open.... it seems to be the front thats loose.... I don't know what to do with it, and it appears to be letting in water...