Praise be to Allah, the Lord of the Worlds; and may His blessings and peace be upon our Prophet Muhammad and upon all his Family and Companions.
Islam prohibits selling human organs since this constitutes a form of offense and dishonor to their owners whereas Allah honors them in His saying: {And indeed We have honoured the Children of Adam, …………} [17:70]
A human being is not the real owner of his own organs nor of the others, and it is completely wrong for one to sell what he does not possess.
If we legalize such an action, this may give criminals better chance to kill people and trade in their organs, and this is a big evil deed and crime.
However, if an adult person gives one of his own organs to another person for the sake of Allah and provided the doctor's approval to avoid causing any harm to the giver, during one's life or after his death, there is not blame Insha Allah.
Moreover, it is allowed to take an organ or more from a dead person to a living person if this donation will help the receiver to avoid death or to make one of the latter's organ work well provided the deceased's consent or his or her heirs or the Muslim ruler if there is no heir or the deceased's was unknown.
Allah knows best.