For metals and ceramics youngs modulus and hardness increases, whereas for non metals it is not true. For polymers and plastics it is time dependent also. Hardness is function of either single or combination of elestic, plastic, viscous and time dependent.
The bulk modulus is a constant that connects stress to the deformation rates of material under compression. The shear modulus is a physical quantity that alternatively characterizes the deformations caused by sliding forces. In general, the hardness is more sensitive to the shear modulus than the bulk modulus. While the Young’s modulus is a key parameter that reflects the stiffness of materials to uniaxial stresses.
Both shear (S) and Young (Y) moduli can make it possible to determine the hardness property of a material (i.e the ability of a material to resist to a stress and not to deform too much).
Hard materials are those with high Young modulus and quite often with high shear modulus e.g. Diamond is very hard and with Y= 1120 GN/m² and S=450GN/m².
Soft (flexible) materials are those with small Young modulus and also small shear modulus e.g. Lead which is very flexible with Y= 15 GN/m² and S=5.6 GN/m².
However Young modulus is more appropriate to measure the hardness of a material because it is directly related to its elasticity i.e. the ability of the material to experience linear tensile deformation (strain) under the influence of a uniaxial isotropic tensile stress in the limit of elastic reversible linear deformation.
With shear modulus which indicates the ability of the material to slide, the shear deformation (strain) is not always linear and not always reversible which may implie anisotropic effects.