Why did Lord Rama strike from behind to kill Vaali?
We don't need to speculate; we can look at the justification Rama himself gave for his actions: (This is all taken from this translation of the Valmiki Ramayana by Desiraju Hanumanta Rao and KMK Murthy.)
In response to Vali's claim that Rama has no jurisdiction to enforce laws there, since they're not in Ayodhya, Rama says that the Ikshkvaku dynasty has authority over the entire earth:
"This earth with its mountains, woods, and forests, even along with the authority to condone or condemn the animals, birds, and humans on it belongs to Ikshvaku-s. He who is virtue-souled, truth-abiding, plain-speaking, and the knower of the import of probity, pleasures, and prosperity, and the one who is concerned in controlling or condoning his subjects, that Bharata is the ruler of earth."
(Note that he is speaking of his own younger brother, who is ruling the kingdom in Rama's absence.)
Rama says that in punishing evildoers, he is carrying out his brother Bharata's decree to enforce dharma (righteousness):
Holding his virtuous decree desiring to keep up the continuum of righteousness, we and some other kings are wayfaring this earth in its entirety. While that Bharata, the kingly-tiger and a patron of virtue, is ruling the earth in its entirety, who is there to conduct himself in an unacceptable way to morality on it? Abiding in our own pre-eminent righteousness, and even abiding by the order of Bharata we punish him who deviated from the path of morality, according to custom.
In response to Vali's claim that he did nothing wrong, Rama describes Vali's misconduct, engaging in actions quite inappropriate for a king:
As for you, you brought virtue to a state of decadence, rendered yourself reprovable by your own decadent behaviour, for carnality alone has become your primary doctrine, and thus you have not abided by the conduct meetly to a king.... Realise this reason by which I have eliminated you… you misbehaved with your brother's wife, forsaking the perpetual tradition [Sanatana Dharma - the traditional name for Hinduism]. While the great-souled Sugreeva is still alive, you with your habit of sinful acts have lustily misbehaved with Sugreeva's wife Ruma, who should be counted as your daughter-in-law. Thereby, oh, vanara, this punishment is imposed on you, for your dissolute sinning in abusing your brother's wife, thereby for your transgression of tradition and virtue.
Rama says that he is allowed to attack from behind because Kshatriyas are allowed to hunt mrigas (animals) by surprise, and vanaras are shaka-mrigas (jungle-animals):
People will be capturing several animals, either covertly or overtly, with snares, springes and even with numerous contrivances. Meat eating people will undeniably kill animals, either they are speedily sprinting or standing steadily, fully dismayed or undismayed, vigilant or unvigilant, and even if they are facing away, in that there is no sacrilege. In this world even the kingly sages well-versed in virtue will go on hunting, and hunting is no face to face game, as such, oh, vanara, therefore I felled you in combat with my arrow because you are a tree-branch animal, whether you are not combating with me or combating against me.
I should add that most people only know about Vali's harsh questioning of Rama's actions, but after Rama gives his justification, Vali realizes that Rama acted properly:
Oh, best one among men, what all you have said is that way proper, undoubtedly. Indeed an ignoble cannot disprove a nobleman, Raghava, and with regards to the undesirable and improper words I have unwittingly spoken earlier, in that mater too it will be truly unapt of you to make me blameworthy, as I spoke them in anguish and ignorance. You alone are the knower of recourses and their real nature, namely probity, prosperity, pleasure seeking, and emancipation; dharma, artha, kaama, moksha ; and you take delight in the welfare of subjects, and your faultless intellect is clear in accomplishing ends by judging the causes and effects. Oh, Rama, the knower of probity, I am the one who digressed from the rightness and a forerunner among such transgressors, such as I am, give absolution even to me with words abounded with rightness.
Note: “The question: Why did Lord Rama strike from behind to kill Vaali?” is licensed by Stack Exchange Inc (https://hinduism.stackexchange.com/); user contributions licensed under CC BY-SA.