sandlewood, comet
欃 centers on sandalwood, a fragrant wood, and by extension a comet, likely from the comet's tail resembling a wooden broom or brush. The two meanings are loosely connected through the wood radical and a shared visual metaphor.
欃 combines 木 (tree/wood) with 毚, which likely contributes the sound. The sandalwood meaning is straightforward from the wood radical. The comet meaning may derive from a metaphorical extension, but the exact historical development is uncertain.
A tree (木) with a complex right side (毚) that looks like a comet with a long tail: imagine sandalwood branches shaped like a comet's tail.
For サン, picture sandalwood incense burning under the sun: sun -> サン, and the fragrant smoke rises like a comet's tail.