Tunable sources of X-ray radiation are widely used for imaging and spectroscopy in fundamental science, medicine and industry. The growing demand for highly tunable, high-brightness laboratory-scale X-ray sources motivates research into new fundamental mechanisms of X-ray generation. Here, we demonstrate the ability of van der Waals materials to serve as a platform for tunable X-ray generation when irradiated by moderately relativistic electrons available, for example, from a transmission electron microscope. The radiation spectrum can be precisely controlled by tuning the acceleration voltage of the incident electrons, as well as by our proposed approach: adjusting the lattice structure of the van der Waals material. We present experimental results for both methods, observing the energy tunability of X-ray radiation from the van der Waals materials WSe2, CrPS4, MnPS3, FePS3, CoPS3 and NiPS3. Our findings demonstrate the concept of material design at the atomic level, using van der Waals heterostructures and other atomic superlattices, for exploring novel phenomena of X-ray physics.