Nonviolence is an important vehicle for social change—perhaps the most important in this day and age, when violent revolutions have so often simply replicated the abuses they were intended to remedy.
Nonviolent action is an important way to bring attention to social injustices. A prime example of this is the light Gandhi was able to shine on the abuses of the British in India. In one case, he marched to the sea with followers to gather salt, which was illegal to do, to publicize the injustice of forcing the impoverished Indians to pay a salt tax on a staple item they all needed. Likewise, Martin Luther King had followers sit at "whites only" lunch counters and suffer abuse without retaliating to shine a light on the injustices of segregation.
Second, nonviolent action often builds sympathy for the sufferers. Rosa Parks, for example, garnered a great deal of sympathy when she refused to give up her seat on a city bus to a white passenger.
Looking at another social issue, anti-abortion activists are very careful to avoid enacting violence: when, in the 1990s, an activist killed an abortion provider, this was quickly condemned, and the movement clamped down on violence. Similarly, the tearing down of the Berlin Wall, done without bloodshed, built sympathy for a unified Germany.
Third, non-violent action channels anger and destructive emotions away from mindless violence and toward constructive action for change by offering an alternative to violence. Martin Luther King's success with nonviolent actions recruited many disaffected black people to his cause who might otherwise have channelled their anger into violence that could have caused a great deal of death without necessarily achieving their goals.
When the only way a regime can maintain power is through violence, being caught in the vice of either perpetrating violence in a way that delegitimizes its right to govern or allowing needed but unwelcome change to occur creates a dilemma for tyrants that they don't want to face.