It can be welded, but brittleness close to the weld due to the sudden high heating and rapid cooling will probably occur. This could lead to cracking. If something hardened must be welded, it needs to be done with a more ductile weld material, and of course, the weld properties cannot be as if it is an original (hardened) material.
Heating the hardened material as much as possible without affecting its desired hardness would minimise possible cracking.
Better still would be to anneal it, weld it, normalise it and then re- harden and temper.
It still won't make the weld itself any harder.