The Moon [single body orbiting the Earth] versus a moon/moons
There are "different moons": the harvest moon, full-moon, etc. and there are names associated with each month's moon, depending on the culture.
Notice this charming title from National Geographic:
FULL MOONS [countable noun]
Learn about the many names given one of the moon's in Earth's night sky [single thing using "the"]
Then, see this on the same page:
MOON FROM THE INTERNATIONAL SPACE STATION A full moon [one of many moons], captured in 2005 by a crew member of the International Space Station, appears to be rolling along atop Earth's deep-blue stratosphere.
The capitalized MOON has no article as here it is a title. Titles often have their own rules, including removing some articles. This makes this issue even trickier. But it applies to all words that take "the" when used in titles.
Ergo, when you see the moon, it is correct to say: such a beautiful moon, because at other points in the moon's cycle or depending on the month, the Moon is seen as being a moon.
When just referring to the Earth's Moon itself, the would be used: The Moon is so beautiful tonight. Compared to: What a beautiful moon! So, context will dictate whether or not one says a moon or the Moon. [Usually, the Earth's Moon is capitalized, but some publications do not capitalize it.] So the Earth's Moon can be being discussed as the single body that rotates with the Earth around the Sun and around the Earth, or it can be viewed as a countable noun associated with a month or phase.
The Sun [a planet in our solar system]
The Sun takes the. However, there are many suns in the universe. So, the word sun works like any other countable noun. In reference to our Sun, the article "a" would not be used except in a poetic or literary context/way. "A Cold Sun Rises Over Texas" [I just made that up].
As for: "The Sun is so bright today. I have never seen such a (the) sun."
Generally, one would not say "such a sun" because really the only sun we can perceive is our solar's system's sun. We would tend to say something like: The Sun is so bright today. I have never seen so much sunlight.
I think it can be said that we do not "see the Sun" in the same way as we see the Moon. It's not advisable to look at the Sun, therefore seeing it is really not used.