Simplistic answer:
Yes. Density is a factor up to a point where the the given body being hit is a human one. Foam sponge, Aerogel and cotton wool balls, all hurt a hell of a lot less than dropping a solid steel sledge hammer on your foot....

Slightly more complex answer:
Yes density is a factor, but past a certain threshold it no longer makes a difference in regards to contact damage, but still affects the mass of the object - larger mass requiring more energy to be moved = greater impact force against human body. At this threshold the SHAPE of the impactor is more important, sharp or pointed edges concentrating the force in a smaller area will cause much more damage but to a highly confined area of the human skin.
Wood tends to be quite lightweight and flexible, so during a collision with say a chair, the chair will move aside relatively easy.This reduces the forces transmitted to the skin, and as a result relatively little bruising occurs. Large wooden objects also tend to have much more rounded edges than metal objects, partly for aesthetic reasons, and partly due to the material properties not being suitable for forming sharp edges. This also helps spread the load over the skin impact area and reduces the concentration of forces.
Metal objects such as a safe or metal table will usually be heavier than wood due to having a higher density, and typically they will also have much more sharp edges and points due to the material being near ideal for forming into a sharp edge. Large metal objects will require a MUCH greater force in an impact to accelerate at the same speed as a wood item, this results in much higher forces being transmitted through the skin of the human body. Sharper angles and corners combined with a material the does not easily flex will result in a highly concentrated area of force on the human skin, causing significant bruising and damage.
Regardless of density, if an object is fixed in place, then this will also effect impact forces experienced in the human body. If an object is unable to move or flex, then the human body will experience very high impact and deceleration forces. This can result in significant damage to the human body.
The impacted are of the human body will also effect the resulting damage incurred during an impact with a stationary object, fleshy / fatty areas being more flexable and stretchy than thinner areas of skin covering hard bone, such as the hips, knees, elbow, etc. If the skin covering is sufficiently thin, and the impact forces are high enough, then the transmitted impact forces through the human body can be enough to overcome the bone's natural ability to flex slightly, and result in fracture or breakage of the bone.