What is the biological mechanism linking temperature and probability to be infected with a virus?
It is common knowledge that when you're cold you could get a cold.


This may be a nice illustration why we need to be wary of “common knowledge”.


  What is the mechanism linking temperature and viral infection?


This isn’t clear. There are a few proposed mechanisms but a likely explanation is: “there is no mechanism” – and the assumed correlation between cold temperature and catching a cold might be nothing more than an illusion – a form of confirmation bias.

In fact, we don’t even know for sure that the cold season coincides with cold temperatures.

On the other hand, a 2007 review [1] found that


  … most of the available evidence from laboratory and clinical studies suggests that inhaled cold air, cooling of the body surface and cold stress induced by lowering the core body temperature cause pathophysiological responses such as vasoconstriction in the respiratory tract mucosa and suppression of immune responses, which are responsible for increased susceptibility to infections.
   [emphasis mine]


So according to their results, potential mechanisms which link temperatures and viral infection are indirect:


The lowered core body temperature would imply, in my interpretation, that the body has to expend more energy to maintain its temperature, and hence less energy to power its immune system (which is expensive).
Lack of respiratory tract mucosa removes an important physical barrier between the environment and the body, and allows pathogens to enter the body with much less resistance.


[1] Mourtzoukou &amp; Falagas: Exposure to Cold and respiratory tract infections, in Int J Tuberc Lung Dis. (2007), pp 938–943