For example, I know samurai legally had the right to kill peasants who behaved disrespectfully. However, I've read manga which portrays samurai cutting the heads off randomly selected peasants just to test the sharpness of their swords. Knights are often portrayed murdering peasants for similar reasons. To me, these portrayals seem suspiciously like attempts to demonize a supposedly barbaric other time. However, I could be wrong. Is there any evidence that peasants really were slaughtered with impunity during peacetime?
There is definitely evidence that murder, robbery, and depredation on the peasantry was a problem in medieval Europe. The tricky thing, here, is that we have no idea exactly how common it was. In order to explain, I'll need to provide a bit of background.
In the period after the Carolingian collapse (c. 900), France experienced some 150-200 years of extremely limited centralized authority. The Capetian kings, who came to the throne in 987, really only directly controlled the area surrounding the city of Paris. They lacked the strength and wealth to directly impose their will on powerful regional magnates, such as the dukes of Aquitaine, Brittany, and Normandy, or the counts of Toulouse, Flanders, and Champagne. By allying with some against others, they were able to exercise a limited form of control, but it was much more tenuous than it had been before, or would be after c. 1200.
In their turn, these magnates found it increasingly difficult to control the aristocrats theoretically under them, who during this period engaged in both extensive castle building and the recruitment of warriors. In this environment, power devolved downward, to the point that the only real absolute authority was that of a landholder over his property (and servants), and a castellan over an area of five or ten miles around the stronghold. Because of this, there was basically no recourse for peasants to appeal their treatment; certainly, there was no royal law court before which their masters could be dragged. Abuses certainly occurred. But there are probably disincentives to terrorizing, brutalizing, and beggaring one's own economic base on a regular basis. You don't want your serfs hiding in the hills or too impoverished to afford tools and other supplies. Another reason to not get too out of control is that the church really disapproves of it, and this was an intensely religious age.
More importantly, this same lack of recourse to royal law left aristocrats with no way of resolving disputes other than by making war on each other (and each other's lands). Because individually these aristocrats were generally quite weak, these wars tended to be small scale affairs, consisting of a great deal of raiding, some sieges, and the occasional clash of small (dozens or hundreds, not thousands of men) armies. These conflicts that proliferated in France during this period have been referred to by previous generations of historians as feuds, but the more accepted, and, I think, better, way to view them is as private warfare, very often fought for political rather than personal reasons (though both could well overlap). In this context, peasants very well could suffer cruelly at the hands of wrangling aristocrats and their men.
The reason why I am tremendously reluctant to state to what degree abuse of the peasantry occurred in this period, either in war or peace, is that almost all the sources that describe such behavior are written by churchmen. There are no accounts written by peasants that I am aware of for the entirety of the 10th and 11th centuries. Similarly, I can think of no aristocratic writers, at least prior to 1050, who describe such behavior. What we are left with are things such as the Peace and Truce of God movements. The Peace of God movement was a popular movement, spearheaded by the clergy of Aquitaine, to restrict aristocratic disorder by establishing classes of people who were theoretically immune from violence - peasants and clergy, mainly. From this, while we can see that it was definitely something that concerned churchmen, we don't have anything like hard figures for how often it occurred.