"I like the sun and I don't like the fog."
Translation:Я люблю солнце и не люблю туман.
The conjunction "а" is mostly used to contrast single entities, rather than whole statements. And the way the Russian sentence is constructed - the way both parts are written as factual statements, using the regular word order, and there's no stress on any specific word - using "а" as the linking conjunction would sound awkward.
You can use "но" instead, this one is specifically used to contrast statements: "Я люблю солнце, но не люблю туман". The result, however, arguably strays too far from the original English sentence, expecting it to have a 'but' instead of the 'and'.
Here are some of the ways the Russian sentence could be rephrased to allow the "а" conjunction (emphasised words are in bold):
"Я люблю солнце, а туман не люблю" - works as a translation of the original English sentence.
"Я люблю солнце, а не туман" - I like the sun, and not the fog.
"Я люблю солнце, а не люблю - туман" - I like the sun, and what I don't like is the fog.
"Я люблю солнце, а не избегаю его" - I like the sun, not avoid it.
"Я люблю солнце, а он не любит" - I like the sun, and he doesn't.
In regard to the last sentence, it should be noted that the conjunction "а" can be used to link complete statements when those have different subjects: "Я люблю солнце, а он не любит туман". The statements are not exactly contrasted in this case, however.
This one falls into the 'different subjects' case I described in the last paragraph. It's a whole new can of worms, but in short - it's a quirk of the conjunction "и" in that when you use it to link two independent clauses (subject + predicate), it can make it sound like the second clause is a result of the first one. Or at least it's direct temporal continuation.
Meaning, you can definitely use "и" in your example: "Я надену форму, и ты наденешь свитер" - but then it's implied that the second person will put on the sweater only after the first one puts on the uniform. Possibly, only because of that. Translated into English, it would be best rendered as 'and then'.
(At this point, I have to note that this is not exclusive to the conjunction "и", and the list of possible shades of meaning behind each conjunction is beyond the scope of a Duolingo comment.)
What I'm getting at is that the choice of the conjunction is forced in this case precisely because these shades of meaning are too specific, whilst Duolingo is designed to teach you to convey information neutrally. The conjunction "а" simply links one clause to another, introducing a new subject - so Duo expects the learner to draw the conclusion that they're supposed to link clauses with "а", and things within clauses with "и".