Timing is the first clue. A stain that grows during or just after heavy rain, and especially with wind, points to water getting through the roof or past an edge. Drips or damp patches after cold, clear nights, with no rain, point to condensation.
Outside, scan for shingles that are missing, curled or cracked, metal that has lifted or rusted where a wall meets the roof or around a chimney, and gutters that spill over their front edge in a downpour. Grit collecting below downspouts shows the covering is shedding granules.
From the hatch, look at the underside of the sheathing. Dark staining spread evenly across a north slope, frost on nail tips on a cold morning, or wet insulation under a fan duct suggest moisture from inside. A single wet trail running down from a vent pipe, a chimney or a valley suggests a leak at that spot.
A stain directly beneath a bathroom fan deserves a look at the duct before anyone blames the shingles.