The significant difference between the sunroof and moon roof is in the materials they are made with. Fiber composites or metals are materials that are usually used to make sunroof, which makes the roof an opaque one. The car manufacturers once thought of replacing the sunroof with a moon roof, and that was how the moon roof came to stay. The two roofs are fundamentally the same, just that the sunroof is made of opaque materials, while the moon roof is made of transparent materials such as glass.
A moon roof can be used when you want the sun to set in, but you want to prevent the wind; and even when the moon roof is closed, the sun would still shine through it. The sunroof has to be opened to allow the inlet of sun, and of course, the wind will also set it. So, both sunroof and moon roof allows the sun to set in, but not the wind. The sunroof can allow both the sun and wind to set in at the same time, while the moon roof can allow the sun and not the wind.