To say what the weather was like, you normally use the imperfect tense. For example:
Il pleuvait. - It was raining.
Il faisait beau. - It was fine.
Il y avait de la neige. - There was snow.
Le soleil brillait. - The sun was shining.
However, if you want to refer to a specific, limited time, then you need to use the perfect tense.
Hier soir, il y a eu un orage. - Last night, there was a thunderstorm. (The thunderstorm might have started quite suddenly.)
Il y a eu du brouillard ce matin. - It was foggy this morning. (Here we have reference to a specific time – this morning. The fog has gone now.)
Il a plu pendant une heure. It rained for an hour. (In this example, there is a specific amount of time stated. It rained for one hour only, then stopped.)
In many cases, you can start a sentence by using the imperfect tense to set the scene and then use the perfect once you start to narrate events.
Mardi dernier il pleuvait à verse, donc je suis resté à la maison. - Last Tuesday it was pouring down, so I stayed at home.
Il faisait tellement chaud que j’ai décidé de bronzer dans le jardin. - It was so hot that I decided to sunbathe in the garden.
Note these two expressions:
Un jour qu’il faisait beau, j’ai joué au tennis. - One day when it was fine, I played tennis.
Le jour où il faisait froid, j’ai fait du shopping. - The day when it was cold, I went shopping