Honestly, I thing the answer to this question depends more on if your group places more weight on the 'roleplaying' or on the 'game' side of RPGs.
If you're getting together to tell a story, or just have some fun being goofy elves and dwarves, I see no reason to 'punish' someone for dying. If you're telling a story and invested in your character, losing that character will be punishment enough. And if you're just out to have fun, no one should be really punished for anything, as long as they aren't being actively disruptive to the fun.
Now, if you're playing the game as a more competitive endeavor, either as a tactical strategy game, or as a series of dungeon-crawling murderhobo adventures where you want to encourage player skill and cleverness more than anything else, I can see why you might want to punish death. Then it's just a part of the competition, and gets you to think more tactically in order to make up for your relative weakness.
That said, I'm generally against punishing players by taking levels or experience from them in any game. Especially in a game with levels, where the power scale is a bit more rigid and your skills and abilities are affected across the board, being behind the other characters can affect your power compared to the other characters pretty significantly.
Not only that, but if a player dies through bad decisions, lowering their level or otherwise punishing them isn't really going to fix the problem. Death is already a significant punishment itself, and lowering their next character's level on top of that is going to just rub salt in the wound AND make it more likely that they would die in the future.
And really, if someone is acting out or being disruptive enough in a game that you feel the need to punish them? You need to talk to them about the problems they're causing and see if they even want to play, or just kick them out. Don't passive-aggressively punish them with the game mechanics to try and get them to change.
Additionally, I think death is about the most boring consequence a bad decision or a lost roll can have, but that's a different essay for a different time.