While there have certainly been cases where Buddhists have attempted to legitimize their violent behavior, such as many Japanese Buddhists during WWII, an objective look at the Buddha's discourses in the Pali Canon shows that there's absolutely no scriptural basis for violence or violent behavior whatsoever, and most of the justifications for the use of violence are either secular in nature or influenced by ideas foreign to Buddhism proper.
Buddhism, as with Jainism, is founded on the principle of ahimsa or harmlessness and non-violence.T he Buddha never condoned violence, going so far as to lay down rules expelling monks and nuns who even spoke in favour of killing. For example, from the Vinita Vatthu:
A bhikkhu [i.e., Buddhist monk] advises an executioner to kill his victims mercifully with a single blow, rather than torturing them. The executioner follows his advice, and the bhikkhu incurs a parajika [i.e., 'defeat,' expelled from the Sangha]. This judgment indicates that a bhikkhu should not involve himself in matters of this sort, no matter how humane his intentions.
Another example of the his teachings on non-violence from the discourses; although, in context, it's exaggerated example used illustrate the correct way to develop patience and maintain the five aspects of right speech even under trying conditions (MN 21):
Monks, even if bandits were to carve you up savagely, limb by limb, with a two-handled saw, he among you who let his heart get angered even at that would not be doing my bidding. Even then you should train yourselves: 'Our minds will be unaffected and we will say no evil words. We will remain sympathetic, with a mind of good will, and with no inner hate. We will keep pervading these people with an awareness imbued with good will and, beginning with them, we will keep pervading the all-encompassing world with an awareness imbued with good will — abundant, expansive, immeasurable, free from hostility, free from ill will.' That's how you should train yourselves.
Of course, being human, 'Buddhists' are just as likely to commit acts of violence as anyone else, but I don't think their violent acts can be attributed to the Buddha's teachings or to Buddhism in general, and much of the collective use of violence by Buddhists hasn't historically been religiously motivated.
The recent war in Sri Lanka, for example, was an ethnic civil war between the predominately Sinhalese government and predominately Tamil separatist militant organization. This was a conflict that had its roots in the British colonization of Sri Lanka (Ceylon) and their importation of Tamil labourers from southern India to work in tea, coffee and coconut plantations (see Sri Lanka time line).
In regards to the corrupt military junta that rules Burma (Myanmar) with an iron fist, many of which are Buddhist, it's been the Buddhist monks in Burma who've actually lead the largest non-violent protests against the brutal and corrupt regime to date (see Saffron Revolution).
As for the abuse of Burmese refugees by Thai authorities, there's simply no excuse for that, but I think it stems more from Thailand's fears of Burma's military and their reliance on shared gas pipelines than anything else. The Thai authorities simply don't want to do anything that might antagonize Burma's ruling junta, which is a shame since this lack of compassion is directly opposed to the Buddha's teachings.
In the case of the Japanese Buddhists during WWII, much of their pro-nationalistic and pro-militaristic stance was influence by Japan's samurai warrior culture, which, taking elements of their native Shinto religion and Zen, and combining them with bushido (way of the warrior), lead to a religious philosophy that was able to justify (and even glorify) the use of violence.
That said, it's often assumed that Buddhists must be strict pacifists, but the Buddha never forbade kings or soldiers, even those actively engaged in warfare, from becoming lay-followers, so it certainly wasn't a requirement (although he certainly didn't approve of their actions, either). He also didn't say that one shouldn't defend oneself when necessary. Nevertheless, pacifism is definitely inline with the first precept and the principle of harmlessness. In fact, I think Thanissaro Bhikkhu makes a pretty good case for this in his essay "Getting the Message." Matthew Kosuta also makes a good case for this in his paper, "The Buddha and the Four-Limbed Army: The Military in the Pali Canon".