Not in the US or any other country I'm aware of. Of course, there's always civil law so a programmer could be sued for damages they cause.
So why are their laws for medical and legal malpractice but not for programming malpratice? I think it's because it hasn't developed into enough of a profession. For example, both of those professions have professional societies with the power to disbar their members and formalize best practices. Identifying the right thing to do is the first step toward writing laws to punish when they are ignored.
Most 'codes of software development' are informal documents on the web, 'manifestos' or 'considered harmful' documents.