It is not necessary, unless you want to make a slight break between the two halves of the statement.
In other words, it would be almost as if you were writing:
In the morning it was cloudy. And in the afternoon it rained.
A comma makes a lesser stop than a full stop, but still gives a slight gap between the two parts of the sentence.
Some people would argue that as each part of the sentence has its own verb it is better to separate them slightly. However, the sentence is quite short and perfectly easy to understand without the comma, so excess punctuation is best avoided.
It would be better to use a comma if, for example, the sentence was:
In the morning it was cloudy with some drizzle and a cool breeze, and in the afternoon it rained heavily although the wind had died down.
A Forenoon’s Engagement.
The Topeka Daily Capital, June 5, 1884 [copied from New York Graphic.]
Oscar Wilde, among his various stories told in the United States of which he was always the aesthetic hero, related that once, while on a visit to an English country house, be was much annoyed by the pronounced Philistinism of a certain fellow guest, who loudly stated that all artistic employment was a melancholy waste of time.
“Well, Mr. Wllde,” said Oscar’s bugbear one day at lunch, “and pray, how have you been passing your morning?”
“O! I have been immensely busy,” said Oscar, with great gravity. I have spent my whole time over the proof sheets of my book of poems.”
The Philistine with a growl inquired the result of that.
“Well, it was very important” said Oscar. “I took out a comma.”
“Indeed,” returned the enemy of literature, “is that all?”
Oscar, with a sweet smile, said; “By no means; on mature reflection I put back the comma.”