first make sure the sun roof is in fact closed all the way. I've made that mistake.
there are 4 drains (one in each corner). the hoses then run down the "A" and "B" pillars. the drain hoses can pull off the plastic nipples of the sun roof channel. you can glue them back on with silicon adhesive, or perhaps use hose clamps. to get at the drain hoses you have to first drop the headliner panel. there's no way to make sure the drain hoses aren't clogged except by going from the sunroof side.
It's funny, the 4 drain hoses are quite large in diameter. I had a 1937 Ford which had a windshield that could be cranked opened from the bottom. It had a tiny little drain (1/8") in each corner of the opening, but you couldn't pour water into those drains fast enough to make it leak. Gravity I guess... of course being so small they could get clogged pretty easily.