Introduction
There are water drains at the corners of the sunroof that let water drain out to an exit at the door hinge. This was added to VW's maintenance recommendations after the lawsuit. The drains should be checked once every 2 years or 40,000 miles and cleaned as necessary, whichever occurs first. If you park under a tree or leave the sunroof open it gives a greater chance for clogging due to debris. In that case I recommend actively cleaning and checking twice a year. If it gets blocked, the water will back up and empty into the driver or passenger side footwell, causing possible water damage to electronics, mold, etc.. Regular cleaning will help prevent this. Other common places for water to leak in is from a bad windshield gasket (if you recently had the windshield replaced) or the shelf area under the windshield.
Checking just involves pouring a cup of water down the drain to flush out any buildup that could block it. Cleaning involves pushing out any debris.
Mk3 Passat sunroof drains exit into the fender. All other VW TDI drain into the door hinge area as pictured below.
Mk4 Passat (1998-2005) also have drains under the windshield area. Lift up the plastic cover and there are 2 drains - one under the battery and one under the brake reservoir. Leaves can clog these and cause pooling of water which can enter the cabin and damage the CCM (comfort convenience module). This module controls functions such as windows and keyless entry.
Warning - if you do poke a hole into the line or it's already broken, feed a new line into the old line as pictured below instead of taking the interior apart.
weedwacker line or something stiff and flexible but not hard or sharp like a coat
hanger (too hard)
some water to flush out the drain
Open the sunroof and front doors. There are 4 drains at the sunroof,
one at each corner. A weedwacker line is pictured sticking in one of the
drains.

In the mk3 passat the drain outputs are in the
fender well and not visible. Mk4 Jetta and VW Golf drains are in the door
hinge as shown by the weedwacker line. You can clip the tip of the drain
to let water exit easier. This was the modification of the drains
mentioned in the class action lawsuit. The New Beetle's drains are by the
front-lower windshield trim corners. If you can't find the drain output,
pour a little water at the top of the drains and see where it exits.

Pour some water into the sunroof drain at the top and check for proper flow out the drain. This will also help clean out any small particles. I don't recommend compressed air because it might blow loose the line. If this happens, you have to remove the interior panels to repair the line. If it's okay, pour a lot of water in there to flush any particles out. If the line gets dislodged or you find water leaking into the interior, repair it using the steps below.
If it's not flowing well, use a weedwacker line to poke it clean little by little or twist the rubber exit drain with your fingers to open it. Do not use a coat hanger or anything that could puncture the drain line or else you will have to remove the interior panels to repair it! Don't force the weedwacker line!
If you find that the line is broken, you must repair it to prevent electrical and interior damage. The normal procedure is to take the interior panel "A" pillar, the one by the windshield apart and replace the line. If your car is equipped with head curtain airbags there's also an airbag in there so disconnect the battery and follow all applicable cautions in your factory service manual before doing any work.
An alternative is to put a new line inside the old line. Snake a hose into the sunroof drain and out the drain. Then trim to fit. If it doesn't want to go in through the top, snake the line in through the bottom. Pictures from volksbloggin.

Put a fitting in the end of the hose to prevent it from falling
in any further. Use silicone sealant to hold the upper end in place and
let dry. Some broken sewer lines can also be repaired with a liner instead of
having dig out the line.

Feel free to sign up and ask a question about this article at the forums here: myturbodiesel.com forums