We have deep-class vowels (a, á, o, ó, u, ú), and high-class vowels (e, é, i, í, ö, ő, ü, ű). Nyár is a deep word, so we use the deep -on. But tél is a high word, so we use the high -en. Nyáron, télen, asztalon, széken, ágyon, polcon, fogason... And just to complicate this, ö/ő is also high, but we also have -ön, for example tökön, ördögön, bőrön, etc.
Yes, front e/i/ö/ü and back a/o/u (and their long variants) are two groups taking -re/-ben/-vel and -ra/-ban/-val respectively. Having front (e) and back (a) harmony. If a suffix starts with a vowel, it's omitted if the noun ends with a vowel.
But then they can furthermore be split into two more; the e/ö and a/o groups. – E harmony takes -et/-ek/-en/-hez/-em, and Ö harmony takes -öt/-ök/-ön/-höz/-öm, and you can always determine which it is by the -hez/-höz suffix. – A harmony takes -at/-ak/-am and O harmony takes -ot/-ok/-om, but since all these suffixes starts with a vowel, you can't determine if it's A or O harmony for nouns ending with a vowel. You don't need to know it anyway.
Vowel harmony. The -n suffix takes -on/-en/-ön. A noun with back vowels a/á/o/ó/u/ú (think of the vowels in autó) takes -on, unless it already ends with a vowel, then it's just -n.
nyár has á, so it takes -on.
tél has é, so it takes -en.
The front vowels are a bit trickier for the -n suffix, since you have both -en and -ön, a difference not found for most suffixes. But basically, if the word takes -ek, it's -en, and if it takes -ök, it's -ön. télek → télen, and körök → körön. So if you know its plural form (-k), you know its suppressive form (-n).