There are many processes involved in penetration of matter by electromagnetic radiation. At 2.4 GHz, the principal mechanism limiting the penetration depth is often ohmic dissipation of induced ionic currents. A microwave oven doesn't heat pure water very effectively, but add a bit of salt to the water, and the effect becomes stronger.
At shorter wavelengths, molecular vibrations and electronic transitions play a role. The bands where these effects occur may be wide (depending on the material), but they generally decline out of band.
When you get to UV, photoionization is the major mechanism. For any particular ionization pathway, the pattern is that the attenuation jumps up when the wavelength becomes short enough that the photon energy is sufficient to remove an electron from an atom at its particular energy. At higher energy/shorter wavelength, the attenuation due to that pathway declines. However, as you reduce wavelength through the ultraviolet to the soft x-ray, more electrons become available for ionization. More pathways->more opacity. Once you get to the soft x-rays, though, there are few additional pathways left, while the opacity due to each pathway is declining. So, opacity of materials is usually greatest in the UV.