Praise be to Allah, Lord of the Worlds.
Congregational prayer is a confirmed Sunnah where it is permissible for the one, who suffers from allergy that causes runny nose and sneezing, not to attend it under three conditions:
First: There is neither a cure nor a means of prevention.
Second: His condition is so severe that it is difficult for him to pray and he harms others.
Third: It isn`t Friday prayer. If it is disliked for the one who has eaten garlic or onions to attend the mosque, then by analogy it is disliked for the one who has caught a cold to attend the mosque as well. The objective is to prevent harming others and passing the infection to them.
However, if the above conditions haven`t been met, then, in principle, a Muslim should be keen on attending congregational prayers as means of visiting and maintaining Allah`s mosques. Listing valid excuses for not attending congregational prayers, Al-Shirbini (May Allah have mercy on him) said: "Eating stinky foods: onions, radish, garlic or leek. This is based on the narration by Bukhari and Muslim from Jabir that the Messenger (PBUH) said: "He who has eaten onion or garlic or leek should not approach our mosque, because the angels are also offended by the strong smells) that offend the children of Adam." [Muslim]." {Moghni Al-Mohtaj, vol.1/pp.476}. For further elaboration on this topic, kindly refer to the same section of this book. And Allah Knows Best.