Usually I have to gauge how many deaths I'm comfortable with based on the role and champion I'm playing. Obviously, in an ideal scenario, you want to go for zero deaths, but that isn't always attainable and not even the best for your team either.
For instance, if I'm a tank or tanky support, I'm usually okay dying as many as 6-8 times a game as long as I'm A: not feeding needlessly, and B: Racking up a lot of assists and a handful of kills. For instance, I'd say as a utility tank, a final score like 3-7-18 is solid. It might not look good on paper, but if each of those deaths had meaning like saving a carry's backside so they could win the larger fight, or peeling for my team to make a retreat in one piece at my own expense, then they are okay.
As a Carry, I usually aim for 3 or fewer deaths throughout the game. Your job in that role is to stay alive as long as possible while dealing a ton of damage. If I'm dying to frequently, it is usually because I'm getting caught out, or my positioning is bad so my tanks can't peel, or there is a fed assassin on the other team who's made it their sole purpose to tear me a new one.
As an assassin, I'm usually okay with a surprisingly high death count (although to a lesser extent with the new kill streak mechanics) because as long as I start off a fight and take 1 or 2 carries with me, my team has the advantage. However, this doesn't apply to all assassins, nor does a high death count mean the same for every assassin. As a Katarina or Kassadin, I'd be okay with a high death count as long as I still snowball into late game, because those early deaths have little impact once you start rolling hard.
Just as a rule of thumb though, if I ever die in lane, I have to either have a really strong team that I can communicate well with to get myself back into the game (meaning irl people over headsets type of thing) or I have to be on a champion that I'm extremely comfortable with who can snowball easily, and no matter what, I always make it a point to make up at least 10-15 more CS than whoever killed me for each death. In fact, that tactic has won me many seemingly impossible trades because the person I'm playing against doesn't realize that while they scored 3 kills on me early and started roaming that I gained a 50 minion lead and can one v one them and win.