I'm not entirely convinced that I believe that there is such a thing as a robot, as distinct from "a computer in a special case" or "a specialized peripheral for a computer." At least inasmuch as mandating that a robot must (or must not) do certain things is a subset of the problem of mandating that computers must (or must not) run certain programs.
I imagine the vital factor of the concept of a "robot" is autonomous function. A robot can of course receive commands or directives from an operator, but a true robot carries out its demanded functions without direct external guidance, relying instead on its internal programming.
An industrial assembly arm that is operated by a human via a control stick is not a robot, but one that performs the same task independent of human input is. Likewise, an aerial drone piloted remotely is not serving as a robot, but the same drone piloting itself is.
That's part of what makes the concept of robotics so very compelling. The earliest imaginings of robots, well before the technology was anywhere near possible, were conceptions of non-human workers performing the tasks humans would otherwise be required to perform, independent of human guidance. The entire point was to reduce the need for human labor, by offloading that labor to a machine that performs the same physical functions without complaint or concern.
How this should affect Law seems a simple question in my mind.
In any case where a human operator is solely involved, it should be the operator who is the subject of the law - just as the operator of any tool is held accountable for the actions they take and the uses they put that tool to.
In cases where the robots themselves are at fault, well... there things get trickier. The nature of the fault becomes the prime factor in laying blame.
If a mechanical failure causes a vehicular accident, we blame the party responsible for that failure. If your mechanic forgot to refill your brake fluid, they are guilty of negligence. If the manufacturor cut corners during production, then it is they who are guilty of negligence. And if an action on the part of the operator causes the failure, such as overloading the vehicle beyond stated limits, then they are at fault.
The same needs to be true of robots, just without need to concern ourselves over an operator.
If a robot is used to commit a crime, the parties which caused the crime to be possible are the guilty ones. If a mechanical failure occurs, the maintaining mechanic or the manufacturor or whomever allowed the fault to occur is to blame. If a fault in programming allows the robot to function in a way that results in a death, the only logical conclusion is that programmers are guilty of negligence.