"It was sunny yesterday."
Gramatically, you need it :) but in conversation, japanese often shorten the conversation. So you can get rid a particle that doesnt affect the meaning of the sentence. Btw, 'wa' here is used to mentioning 'yesterday' as the main topic.
Kinou wa hare deshita ( Yesterday was sunny )
Kinou, hare deshita (It was sunny yesterday)
No, grammatically you DON'T need it. The words "today", "yesterday", "tomorrow", etc. are used as non-specific temporal adverbs in Japanese, and they can appear anywhere in the sentence. Adverbs in Japanese do not take topics. You can explicitly make 昨日 the topic by appending は, but you can just as easily drop it out.
「昨日」「今日」are primarily nouns, and there's a difference between using them as such vs as time expressions qualifying the action/state. An example like NadiaNatha3's first one:
“Yesterday is today's old times” (昔［むかし］)
Here Yesterday is what we're talking about. You can't drop は and you won't find the proverb without it.