Here is a short description of ISO and IEC standards related to software and medical devices.
The starting point is legal. Government agencies give the authorizations to manufacturers to sell their devices. These agencies rely on standards to ensure that the device was designed and manufactured in a good and safe way. Given these regulations, private companies have to adhere to these standards. Full stop.
Let's see what these standards are.
General standards
Two ISO standards are of high importance for software medical devices: ISO 13485 and ISO 14971. They can be seen as the topmost standards for medical devices. They are very generic and apply to every medical device, from the simplest plaster to the most complex surgeon robot. As they are so generic, they don’t give a clue about software. Other standards do.