It controls the violence of the eruption, type of material produced, and distribution of material away from the vent.
Viscosity is defined as the ratio of shear stress to the rate of shear strain.
Shear stress is that component of stress that acts tangential to a plane through any given point in a body. Shear strain is a measure of the amount by which parallel lines have been sheared past each other by deformation. Thinking of a stack of cards on an inclined plane might clarify your thoughts. Shear stress will be caused by gravity pulling on the cards. Shear strain is how much they slide past each other.