There are a few ways to do it.
1. Cut the sun roof out of another, trace out the new peice and cut yours and weld
2. Trace out the sunroof and cut, no welding needed
3. Get a pro to do it so its perfect with the roof lining and no creases and leaks.
There are a few how to on youtube on all 3 ways.
I was looking to do it a few years ago, and the only people who wanted to do it were the chop shop, rebel restorations, hollianda etc because everything needs to be perfect.
If the roof is bent the sunroof warped or anything wrong with any of the parts you want to use, it will cost you a lot! Everyone I spoke to said to buy new. I've read a few horror stories about cutting too much out and the other problems mentioned above