I am thinking if the Corona pandemic we are suffering is the result of similar and collective bad Karma of almost all we people on earth. What Puranas and Shastras comment about the reason behind such pandemics?
Pandemics are part of the package deal for Samsara. Any one who chooses to live in Samsara will have to face tapatraya or three types of suffering.
Three types of suffering
Of what avail will be the wealth and the objects of enjoyment gained by great effort for man who is naturally subject to the three types of sufferings caused by his own body and mind (Adhyatmika), by external natural forces (Adhibhautika), and by extra-human agencies (Adhidaivika)?
Srimad Bhagavata Purana VII.13.30
Pandemics are classified to be Adhibhautika suffering or act of nature. They cannot be avoided.
God is generally not active in worldly affairs according to Hindu scripture. It is nature that does everything. The implication is that pandemics are due to nature. The reason for pandemics is nature.