Changes in the solar neighbourhood due to the motion of the sun in the Galaxy, solar evolution, and Galactic stellar evolution influence the terrestrial environment and expose life on the Earth to cosmic hazards. Such cosmic hazards include impact of near-Earth objects (NEOs), global climatic changes due to variations in solar activity and exposure of the Earth to very large fluxes of radiations and cosmic rays from Galactic supernova (SN) explosions and gamma-ray bursts (GRBs). Such cosmic hazards are of low probability, but their influence on the terrestrial environment and their catastrophic consequences, as evident from geological records, justify their detailed study, and the development of rational strategies, which may minimize their threat to life and to the survival of the human race on this planet. In this chapter I shall concentrate on threats to life from increased levels of radiation and cosmic ray (CR) flux that reach the atmosphere as a result of (1) changes in solar luminosity, (2) changes in the solar environment owing to the motion of the sun around the Galactic centre and in particular, owing to its passage through the spiral arms of the Galaxy, (3) the oscillatory displacement of the solar system perpendicular to the Galactic plane, (4) solar activity, (5) Galactic SN explosions, (6) GRBs, and (7) cosmic ray bursts (CRBs). The credibility of various cosmic threats will be tested by examining whether such events could have caused some of the major mass extinctions that took place on planet Earth and were documented relatively well in the geological records of the past 500 million years (Myr). A credible claim of a global threat to life from a change in global irradiation must first demonstrate that the anticipated change is larger than the periodical changes in irradiation caused by the motions of the Earth, to which terrestrial life has adjusted itself. Most of the energy of the sun is radiated in the visible range. The atmosphere is highly transparent to this visible light but is very opaque to almost all other bands of the electromagnetic spectrum except radio waves, whose production by the sun is rather small.