There is a lot of nuance around this, so if you are still in Genki I level textbooks I would worry too much about it for the moment.
That said, は and の still have different meanings even if they are being used in a very similar way here. You’ve probably seen の used as a possessive, like 私のえんぴつ, which would mean “my pen” and の is being used to show that the pencil belongs to me. の can also be used to make connections between two things, without one specifically owning the other. For example, 東京大学の田中先生 (toukyou daigaku no tanaka sensei) would be a case where rather than saying it is the college’s Tanaka Sensei, they are saying Tanaka Sensei of Tokyo University. Like I said, pretty nuanced.
は on the other hand not only marks a topic, but distinguishes it from other potential topics. So when when someone says きょうは, they are not just saying “today” but they are distinguishing today from other topics in context. A more accurate translation would be “As for today, as opposed to other days, …”
So from the two examples you gave:
きょうはてんきがいいですね would be “As for today, (as opposed to other potential days) the weather is nice.”
きょうのてんきはいいですね is more like “As for today’s weather (as opposed to other day’s weather or other things of today), is nice.”
Now this is the part where I am less confident so don’t take me at my word, but I think the reason the first is more common is more a function of how people say things rather than a case of being correct or incorrect. My best guess is that の is used to make connections between two things, but the Japanese simply don’t connect the weather to the day in that way. Rather than it being weather of the day, or the day’s weather, There is just today, and something that exists today, among many other things, is weather. In English we do attribute weather to days in that fashion, so it’s just a difference of phrasing. I think if you said it your way to a Japanese person, they would understand you, but it would just sound a bit strange.
Super long response but I hope something here was helpful!
P.S. Here’s a link to a book called “Making Sense of Japanese” that discusses は and が, among other things, in much greater detail with a lot more nuance. If you’re in Genki I (or an equialent level textbook), I might hold off on reading it until you get through Genki II level books, but it’s been a really helpful resource for me. https://www.amazon.com/Making-Sense-Japanese-What-Textbooks/dp/156836492X