Ok.....for the sunroof, check circuit breaker #3 (30 amp) under the Instrument panel (left of the steering column, main fuse block). Probe the pink wire coming from pin 76 for 12v with the ignition on. I believe this CB also controls the power windows, though, so if they work, the CB may not be suspect. I suspect the problem lies in the sunroof control module, however. It'* located above your passenger'* head under the headliner. Check for power on the pink wire here, if it'* too hard to get to it from the fuse panel.
On the sunroof control module, Pin C is power from the breaker, pin D is ground (black wire), Pin A is for forward, B for backwards (check these when the switch is pressed). It could also be the motor. Connect a jumber from Pin C to either A or B, and see if the motor runs.
I don't believe your power locks are related to this at all. On to the next one......
For the door locks, you need to isolate the problem by disconnecting all 3 passenger controls. If you still have the problem, it lies somewhere in the driver'* door more than likely. The suggestion for checking your battery/charging (alternator) is a wise one, but I would expect other symptoms as well. Power is NOT shared between the door locks and stereo, so if it'* not a weak battery, you may be looking at a grounding problem. Try the lock/stereo thing with jumper cables hooked to another running car.