If you read the sentence aloud or in your head, you should notice if there's a pause between cold and yet.
If there's quite a pronounced pause, then you should add a comma. I think it sounds more natural to have a longer pause in your sentence.
If you change yet to but, I think both with a pause (comma) and without a pause (no comma) sound fine. The comma would simply add more emphasis to the contrast.
Also if you just said: 'The weather was cold yet sunny,' it would sound natural without a pause (no comma).
Apart from instances (such as relative clauses) where the comma changes meaning, you should think about how the sentence would sound when it's read. If you want there to be a pronounced pause, use a comma. If not, don't.
Remember, punctuation is used to help us to be able to read a sentence correctly. While there are lots of rules, we shouldn't lose sight of this fact.