What to KnowImmune means "free, exempt" or "protected from" in general use, and "resistant to a disease" in common medical use. In most cases, if you are immune to something, it generally has no effect on you—for example, you might be immune to a disease or to criticism. And if you are immune from something, it cannot reach you—for example, one might be immune from prosecution in a plea bargain.
When it comes to language, no one is immune to making mistakes, and unfortunately, when we make mistakes, none of us are immune from criticism.
And there are questions to which we have no immunity, like whether immune should be followed by to or from.
Immune has a number of meanings, including "free, exempt" and "marked by protection":
As long as the Roth has been open for at least five years prior to your death, the money in that account is immune from federal income taxes.
— Wendy Connick, Associated Press, 14 Sept. 2017For the first time in its history, the Court declares an entire class of offenders immune from a noncapital sentence using the categorical approach it previously reserved for death penalty cases alone.
— Justice Clarence Thomas, in Graham v. Florida, 17 May 2010
In medical contexts, immune means "having a high degree of resistance to a disease or the effects of a drug or chemical":
The idea is that when the genetically engineered mice mate with the native mice, their offspring would also be immune to Lyme disease. Over time, this would reduce the prevalence of the disease.
— Christina Quinn, in PBS Newshour, 12 Sept. 2017
Immune to vs Immune From: Can it Get You?
The traditional advice given by usage commentators is that you become immune to a disease or a drug, as in the above examples, but immune from something when the object is some kind of obligation or duty, such as taxation, or something that can happen to you, such as prosecution. (In Latin, immunis means "exempt from public service.")
Some commentators recommend determining the appropriate preposition based on the relationship between the affecting thing and the object being affected. As Bryan Garner explains in Modern American Usage, "What you’re immune from can’t touch you; what you’re immune to may touch you, but it has no effect."
So if you are immune from prosecution, the prosecutor cannot go after you; if you are immune to a suitor's charms, the suitor can keep wooing you, but it will be to no avail. A person immune from criticism cannot be criticized; a person immune to criticism can be criticized but doesn't let the criticism bother them.
Actual usage tends to be somewhat murkier, particularly when the affecting thing is expressed in abstract or figurative language:
Williams said Kansas is not immune to earthquakes. There are fault lines near Manhattan, and the eastern half of the state sits between two major mid-continental faults…
— William Klusener, _The Morning Sun _(Pittsburg, Kansas), 9 Nov. 2011Liberals are not immune from temptation and hubris even when they mouth correct sentiments.
— National Review, 2 Sept. 2013And yet, because they admit to being partial inventions, these films evade charges of distortion and falsification, and are immune to any legal consequences that might follow.
— Sean Wilentz, The New Republic, 1 Feb. 1993Up went his temperature; off to bed I packed him; and in a week he was all right again, and absolutely immune from typhoid for the rest of his life.
— George Bernard Shaw, The Doctor's Dilemma, 1906
Since the very nature of the word implies a kind of separation or distancing—either from disease or trouble—it's understandable that from is sometimes preferred. Are there other options? Once in a while we run into the occasional immune against, but this is rare:
Third, the fortunate ones of us who do recover develop antibodies that leave us immune against a recurrence of the disease for a long time
— Jared Diamond, Guns, Germs, and Steel, 1997
We hope we've helped bolster your immunity to this problem. (Regardless, our best advice is to avoid the need to be immune from prosecution in the first place.)
In summary: In most cases, if you're immune from something, it cannot reach you. If you're immune to something, it will not affect you.