These are good questions.
First, visible light covers the wavelength range ~6500 Angstroms (~ 2 eV) to ~4000 Angstroms (~3 eV).
UV light extends from ~4000 Angstroms (~3 eV) to ~ 100 Angstroms (~120 eV). See chart in
http://en.wikipedia.org/wiki/Ultraviolet
X-rays cover the range 100 Angstroms (~120 eV) to 0.1 Angstroms (~120 KeV)
Photons above this energy are generally called gamma rays.
A photon exceeding the work function energy of a material can eject a photoelectron. Work function energies range from ~ 2 eV to ~ 6 eV. (Photoelectrons of a lower energy can knock electrons from the valence band to the conduction band in semiconductors.). See table in
http://en.wikipedia.org/wiki/Work_function
For isolated atoms, the ionization energy (energy to knock out an electron) ranges from ~ 3 eV (cesium) to 24 eV(helium). See table in
http://www.science.co.il/ptelements.asp?s=ionization
X-rays historically were the rays coming from atomic electron transitions, the highest being a K-shell x-ray from uranium. These were first generated by accelerating electrons and hitting targets made of elemental materials. The x-ray energy from a bare uranium nucleus capturing 1 electron is 13.6·Z
2 = 13.6·92
2 = 115 KeV.
In the photoelectric effect, a bound electron absorbs 100% of the photon energy. The electron must be bound to satisfy kinematic equations (conservation of energy and momentum). For deeply bound electrons in atoms (e.g., K-shell) this now called deep core photoejection.
For free electrons (and also bound electrons), a photon can
inelastically scatter off an electron. At low energies this is called Thomson scattering; at higher energies Compton scattering.
X-ray sources include electron bremmstrahlung and x-ray targets and synchrotron radiation. Any photon from a nuclear decay is a gamma ray, irrespective of its energy.
X-rays from particle (e.g., electron) accelerators (including electrostatic machines) can be extremely dangerous. They can cause severe burns, organ damage, and chromosome damage.
Bob S