I always thought of as a good thing to do, but I have just read an article by Damian Keown which had some disturbing points in it. see
Buddhism, Brain Death, and Organ Transplantation by Damien Keown
Journal of Buddhist Ethics, Vol 17, http://www.buddhistethics.org/current.html
The problems seem to stem from the definition of death and the need for doctors to take organs as soon as possible, while they are still 'fresh'.
There are some instances where a patient is still breathing, heart beating etc and organs are 'harvested'. The patient may be brain dead but still 'alive' in a sense. Keown briefly mentions the story of a woman who was a few months pregnant and then declared 'brain dead'. She was still able to go full term with the baby and then even produced breast milk - which implies brain activity.
There may be a problem with the definition of 'death'.