First, from Tsongkhapa's viewpoint, there are three types of karmic results. One of them is the result similar to the cause. It is often thought that cancer or other deadly ones result from having taken life/lives in past life. A reason for thinking this way is that it may help the meditator to lessen anger (that would come from feeling that it's unfair or underserved). Thinking "cancer comes from such a negative action" is meant to generate regret (not incredible guilt or remorse that will have you paralyzed), and apply antidotes so as to stop engaging in negativities. One has to be careful with this way of thinking. For instance, telling a third person "it's just karma" or "it's because you killed in the past" might not be the best thing to do. It is first and foremost something to take for oneself, to improve one's own practice. To be taken and given carefully. These considerations are not so much to be taken as descriptive than instructive, so as to meditate, dwell on them, and generate within one's own continuum, antidotes to anger and so forth. Dwelling on the notion that "one created the causes of whatever awful turn of event occur" would otherwise be sterile or even possibly dangerous.
Also, a ripening of a karmic imprint is always "karma getting exhausted" but is not necessarily a sign of purification.
As to prayers, in Tibetan monasteries, we perform pujas ("ceremonies, rituals, prayers") on a regular basis, dedicating to specific people who requested (some giving donation, some not). The most common in this setting are Medicine Buddha Puja and Cittamani Tara Puja. This said, the practice we consider the best in these cases is animal liberation (i.e. saving life, as directly opposed to the cause that was taking lives).