As others have noted, there are both legal and practical aspects to any discussion of potential liability. As a legal matter, being proximate when someone gets dead is unlikely to trigger liability in itself. Like Andy said, you need to have a duty toward someone in order to be liable in tort. For the kind of stuff we're talking about, this is generally going to be a theory of negligence. To prove negligence, the injured diver is going to have to prove duty, breach, causation (actual and proximate,) and damages.
The duty in negligence is the duty to behave "reasonably." What it means to be reasonable changes with the circumstances. For instance, someone trained as a divemaster may have a different standard of what is reasonable than someone who is not trained as a divemaster. A general divebuddy standard of care probably means keeping an eye on your buddy, being aware of them generally, etc. - good buddy skills stuff, like they teach you in OW class.
You breach that duty by behaving unreasonably. No mystery there - fail to do what is reasonable and you have trouble.
Causation is complicated - first, plaintiff must prove "but for" (or "actual") causation. That means that they must prove that the breach of duty was one of the actual causes of the injury, that the injury wouldn't have happened if the breach of duty hadn't happened. Then they have to prove "proximate" causation. That usually means something like proving that the injury was the foreseeable result of the breach. For dive accidents, this is going to be a big part of the case. How do you prove that, but for your dive buddy's failure to stay within line of sight, you would not have panicked and swam 100' to the surface in 2 seconds, thereby subjecting yourself to DCS?
Finally, you have to prove injury. Again, this has already been discussed - the lung rupture or whatever is the injury.
After you get the prima facie case (the four parts I just talked about), you move to defenses. Assumption of the risk is still a defense in most states - basically, if the injured person assumed the risk of a dangerous activity, they can't blame someone else when the activity injures them. Comparative fault is a partial defense in some jurisdictions - to the degree that it was the injured person's fault that they got injured, they can't recover from you. In North Carolina (I believe it is the only remaining state,) contributory negligence is a complete defense - if they are partly at fault, they can't blame you _at all_.
In many jurisdictions, there are "Good Samaritan Laws." Most of these say something like - if you try to assist in an emergency, and do so to the best of your ability, there is no liability for injuries that result from your valiant efforts. Thus, in many jurisdictions the fact that you dragged your buddy to the surface too fast when it looked like he had a problem won't subject you to liability, if you were trying to assist in an emergency.
Contrary to popular opinion, I've found courts to be really receptive to motions to dismiss on truly stupid claims. And in some jurisdictions (blessedly, the one where I practice,) the courts put some really good teeth into the rules that require pleadings to have a factual basis. Thus, many lawyers won't risk taking stupid cases, because they'll get their rear-ends handed to them in fines and sanctions. As a practical matter, out of all of the dive accidents that occur in a year only a minute number result in any lawsuit, and many of those state an actual basis (although they may still be defensible).
In other words, if you keep your head about you and you behave reasonably, you almost certainly will not get sued just for being a dive buddy.
If, on the other hand, you do get sued... I'm happy to refer you to a good lawyer.
Standard disclaimers apply - this isn't legal advice (that much should be obvious). I don't know the facts of your case. I don't know the law of your jurisdiction. Yada yada yada.