as capsat said - the rails need to be lubed with a very very thin layer of silicone grease only. If you want to go completely nuts on it, Mercedes Benz sell a sunroof lubricating paste which sells for about Rs 10,000/kg - the 1 kg is the smallest package. - 1 gram of it is applied to the rails. VW/Audi/Porsche also sell such product in a smaller tube - their roofs are made by webasto and usually are supplied with a "railroad grease"
Any dow corning silicone lube paste works great too - as mentioned above.
If your motor is labouring to move the roof panel then the drive motor and cables are clogged with dirt. The entire assembly needs to be removed from the car and thoroughly cleaned, In similar fashion to the slider, the cable assemblies are also lubed with the same type grease - but a very very miniscule film of it. If you load it up with grease, it will jam.