If somebody in a peril situation asks to die, then why not? It's their body, let them do what they want. Albeit, a person not in such a situation should seek help.
If somebody is brain-dead and is being kept alive on life support, then it should be up to the family members. The only benefit of that person's body being alive would be to comfort the family, so if they want to pull the plug then let it be. A brain-dead person has no chance of ever waking.