EM radiation - electromagnetic radiation or photons - is generally not a serious threat to humans in space. The sun emits almost all of its EM radiation in the near infrared, visible and near UV spectrum where the photon energies are too low (i.e., the frequencies are too low or wavelengths are too long) to be ionizing. They mainly just heat whatever they hit.
A small fraction of sunlight is at shorter, ionizing UV wavelengths that could injure an unprotected astronaut by burning the skin or damaging the eyes, just as it can cause sunburn on the ground even through the ozone layer. But most structural and window materials (including ordinary glass and the Lexan in helmets) are opaque to UV, so it's easy to protect an astronaut. Solar UV is mainly a materials problem for the engineers, not a health problem for the surgeons. Along with charged particle radiation, UV slowly degrades space solar arrays.
The only real risk from solar UV to astronauts is from UV-transparent quartz windows specifically installed for UV photography. Quartz windows were installed on some of the Apollo J-mission CMs and on Skylab, so the astronauts had to protect their eyes and skin and cover the quartz windows with a shade or UV filter when not in use for UV photography. Dr. Owen Garriott, who flew on the second Skylab crew, recently told me that various alarms would go off if the UV windows on Skylab were left uncovered for any length of time.
There are almost no solar X-rays, which are shorter (more energetic and ionizing) than UV. A blackbody has to be heated to millions of kelvins to emit significant X radiation, and the sun's photosphere (the "surface" we see glowing with visible and near IR light) is less than 6000K. It's just not hot enough. (Nuclear weapons are hot enough to glow mainly in soft X rays for a few microseconds. These X rays are quickly absorbed by the surrounding air, rapidly heating it to form the fireball that re-radiates in the visible. The outer layers of the sun perform much the same function for the nuclear fusion reactions going on in the core.)
The solar corona is at several million kelvins (for reasons still not fully understood) but it is too thin to generate much X radiation. The sun emits significant X radiation only during flares when a massive chunk of solar atmosphere is suddenly heated to millions of kelvins and thrown off the surface. Again the mechanisms are not understood, but a section of a magnetic field line coming out of the sun detaches and forms a closed loop that rapidly collapses and dumps its stored energy into the plasma. A big flare can emit enough X radiation to significantly increase ionization in the D layer of the earth's ionosphere, increasing radio signal absorption so suddenly that the entire HF ("shortwave") radio band goes dead. (The D layer is what normally keeps you from hearing distant AM radio stations during the day; it dissipates at night, letting signals reach the higher F layers that act as efficient reflectors for long-distance propagation.)
This Sudden Ionosopheric Disturbance or radio blackout is often the first sign that a big solar flare is in progress. Because SIDs are caused by X rays traveling at the speed of light, they happen only 7 minutes after the event (light travel time from the sun) and affect the entire day side of the earth (radio propagation on the night side is initially unaffected). If there's a coronal mass ejection, its charged particles are much harder to shield so they can threaten astronauts. But most flares don't produce a CME. Even when they do form they often miss the earth/moon entirely. And even when they do hit us they arrive hours or days after the flare so there's often a warning. Spacecraft now constantly watch the sun, several from the Earth-Sun L1 point 1.5 million km toward the sun. Any CME must pass L1 on its way to earth, so these satellites give us at least 30 minutes of warning.
The STEREO missions have cameras continually watching the sun in the extreme ultraviolet where the sun is ordinarily fairly dark. Flares show up spectacularly on these cameras, which have returned many stunning pictures, often in 3D as viewed from two seperated spacecraft.