Flying exposes us to more radiation since we are closer to the sun, and there is less atmosphere to protect us.
Consider an airline pilot flying on a routine and frequent basis. How much radiation is absorbed per flight hour, and per year?
Aviation Stack Exchange is a question and answer site for aircraft pilots, mechanics, and enthusiasts. It only takes a minute to sign up.Sign up to join this community
The average additional annual dose for flight crew is 2.19 mSv (milli sieverts). http://www.hps.org/publicinformation/ate/faqs/commercialflights.html
The typical annual dose from background sources is 4 mSv (this varies enormously on the Earth's surface). However, as a rough order of thumb, the annual radiation dose of a flight crew member increases by about 50% compared to sitting on the ground.
For comparison with other sources, having a chest CT scan provides you with a 7 mSv dose over the period of a few minutes.
The maximum permitted dose in one year for a radiation worker under US Federal Law is 50 mSv.
For more comparisons of radiation dose, see https://xkcd.com/radiation/
On a technical point, the premise of your question is incorrect.
Flying exposes us to additional cosmic background radiation because we are at a greater height above the Earth's surface, not because we are closer to the sun. We are protected from cosmic radiation by the presence of the Earth's magnetic field, which extends far into space and is not an issue here except very close to the poles; and more importantly, by the layer of atmosphere above our heads that tends to absorb cosmic rays before they reach the surface. At 40,000 feet, the bulk of the atmosphere by mass is below you.
It is not presently believed that a substantial fraction of these rays are emitted by the sun. For one, you will continue to be irradiated by them at night.
(For interest, if you could see the cosmic background radiation, it would be approximately as bright on the night sky as star light is; for complex reasons the two energies are in rough equipartition.)
I'd say radiation from a chest X-ray is 0.013 mSv. Background radiation is said 2-3 mSv per year. If you live in a place with granitic soil, you get around 2.5 mSv a year. Individuals exposed to 6 mSv a year or more should be monitored. Work Exposure is restricted to 20 mSv annually for a period of 5 years, with a maximum of 50 mSv in any one year. An abdominal CT means 10 mSv, so, background average radiation an US person receives a year is considered to have doubled, and this means a very small, but mensurable increase in the risk for Leukemia and Lymphoma (e.g. INWORKS study, K Leuraud et al). Some elements used in construction released radioactive gases as Radon. Radon was found in too high concentrations inside some rooms in certain houses. High Radon concentration exist in Uranium mines, however, the type of radiation matters, and also the pace of radiation exposure.
Extremely energetic Cosmic rays are blocked by atmosphere, but not by an airplane's hull. Also UV radiation is higher in the heights. This induces that flight crews do have a higher incidence of all types of skin cancer, including malignant Melanoma, and also male crew members do tend having more girls than boys in their offspring. Perhaps the reason for this shift in sex ratio is that the redundant X chromosome in girls compensates for the damages that the other X chromosome may suffer. Boys have only one X chromosome. If other chromosomes from the male parent are damaged, it may result in a higher incidence of miscarriages, even unnoticed ones, in the pregnancies resulting from males working in airplane crews.
Data about Radiation and UV Light as a carcinogen can be found at several cancer organizations sites, as the American Cancer Society, specially in their publication: 'CA, a cancer journal for clinicians', that is of open access. (eg Linet et al, 2012; Kim 2009; Hunter 2005; Heath 1996; Weinstein 1982; Joanna F Haas, 1979; Ryser 1974; Simpson 1958)