Both are correct and quite natural, and have the same meaning of describing and giving an opinion about the previous day's weather.
If you're looking to split hairs over tiny differences though, there are pragmatic differences between the two structures.
The "It was a..." has the feel of a written narrative, like it's introducing the context for a story that's not necessarily about the day itself, but something that happened to occur on that day.
Here's some examples:
It was a beautiful day yesterday, so I went for a walk and bumped into one of my friends from grade school.
It was our 10th wedding anniversary yesterday, and we had a reservation, but our babysitter cancelled at the last minute.
It was a particularly rough day for the IT department yesterday, so after work a bunch of us went to a bar and vented.
The "Yesterday..." structure works just as well in those examples, but feels more like a casual anecdote, and less like a narrative.