Pensieves, the memory-storing devices, would be extremely useful in criminal trials, as they would take out the factor of witnesses lying. Or, they could just bypass the whole trial by forcibly taking memories from the accused to see if he/she is guilty. Is this legal, and is it ever used? If it is not used, why not?
It would seem that pensieves are valid in trials, just usually not used.
“Yes, but it took a great deal of skilled Legilimency to coax it out of him,” said Dumbledore, “and why should anybody delve further into Morfin’s mind when he had already confessed to the crime? However, I was able to secure a visit to Morfin in the last weeks of his life, by which time I was attempting to discover as much as I could about Voldemort’s past. I extracted this memory with difficulty. When I saw what it contained, I attempted to use it to secure Morfin’s release from Azkaban. Before the Ministry reached their decision, however, Morfin had died.”
(Harry Potter and the Half-Blood Prince - Chapter 17)
No canon evidence
A Pensieve can only store the memory, but the actual work of getting the memory (voluntarily or by force) is up to the Ministry.
As @ibid has nicely put, Dumbledore had to use Legilimency for extracting memory, in the above example.
But, I think Pensieves would not be a reliable method for doing criminal trials.
Because if they do use them in criminal trials, then villains would definitely start seeking expertise at Occlumency (defence against Legilimency). So, then, it might be difficult for even Legilimency experts to get through their minds (maybe, Voldemort and Dumbledore might be the only exceptions).
Another point to keep in mind is that memories can be easily modified in the HP universe. And there are countless canon examples of that happening too. So, using Pensieves for criminal trials can also be very deceiving if the memory of the person is modified, and might even set the case (which is being investigated) into a whole wrong path too.