The sun **had shone** yesterday after it **had been** cold for many weeks.
*Explanation:* The sun had shone is Past Perfect Tense, which means that the sun shone after a long period of being cold. The reason for using Past Perfect 'had been' is that it refers to a condition that preceded another past action.