Justifying lockdowns from a standpoint of defending individual rights
Many people opposed to lockdowns feel they are an improper state interference with our liberty. Possibly an unconstitutional one, particularly in the case of religious gatherings.
For people who believe in a strong state, the lockdowns don't need much justification. For those who believe in limited government, it's a harder question.
Even the most libertarian people tend to feel the state has a legitimate role in protecting the lives and safety of the people. It has a monopoly on force, operating police, courts and the military to protect people, which is its legitimate role.
Here I explore some theories of lockdown justification based on principles of individual rights and small government.
If you breed and foster viruses, you are a threat
A person with an infectious fatal disease is a dangerous threat. They expose those they come into contact with to great, even mortal risk. Society lets people expose others to risks, but we don't tend to accept high mortal risk. We have a right to defend ourselves against it, or in particular to expect the government to act in our defence.
The personal right to life is the first of the individual rights, and you don't have the right to, through your deliberate negligence, infect me with a fatal disease
Naturally, how much this happens depends on the level of the risk. There is much debate about just how dangerous Sars-Cov2 is, and whether that level of danger justifies the actions taken to defend against it. Actions which do clearly impinge on the freedom of others. While people certainly do not have the inherent freedom to infect people with dangerous diseases, they do reasonably expect freedom of movement and association and it's a quandary when these come into conflict.
In almost any ethos, if you were infected with Ebola and you started lunging towards me, trying to hug me, I could use extreme force to defend myself. Including asking the government to force you into quarantine. Covid-19 is not Ebola, but rather than debate the fine points of how deadly it is, let's stipulate, in order to examine the moral questions, that it is indeed extremely dangerous.
Infections are special. Clearly if you know you are infectious, you should not be going out. Not only can you infect others, but they can pass this infection along in an exponential explosion. "Patient Zero," who first receives a new disease from an animal source, has caused, even though not deliberately, historic levels of harm. In addition, the more that people gather in groups which may contain an infected person, the more the risk of exponential spread increases. Even a gathering of people who have all knowingly consented to the risk of infection from the gathering can do harm to others, because it's close to impossible for them to assure that none of the others at the gathering will never come into contact with those who did not consent. The mere act of gathering produces risk for others outside the group, and for all of society. It is under this understanding that gatherings get regulated in an epidemic.
The key realization is that while one has the freedom to gather or to work, one does not have the freedom to knowingly breed and spread fatal infectious agents. You have a duty of care to avoid doing that, or you impinge on the rights and lives of others by creating more virus. And while I believe you have the full right to control your own body, and even to take risks to yourself with it, you may not permit it to be used as a bioreactor to breed dangerous diseases which can escape to others.
Giving aid and comfort to foreign invaders
The virus is a lethal foreign invader, smaller but in some ways not so different from an invading army or terrorist group. It is a violation of the rights of others to knowingly help the invader and give it a place to grow.
That alone is reason not to help the invader, and reason why people in self-defence might force you to stop helping via lockdown orders. But there is also an argument strictly from the point of financial liability and individual rights.
Liability rather than statute
Imagine for a moment a world where we could always tell from whom you got an infection. In that world, infecting somebody would be a tort, including wrongful death if the infection were fatal. Infecting somebody with a fatal disease would be manslaughter, and perhaps a negligent homicide. This tort and crime would extend through others infected by the ones you infected, though they would share in the liability, as might others who facilitated those meetings.
Some people would know they were infectious. Others might not know, but should have known they have a probability that they were. In a disease that has asymptomatic carriers and imperfect testing, all should know they would have some probability of being infected without being aware of it. Only a very few could claim they had no idea their actions were risky.
This world would have no state ordered lockdowns. The torts and crimes would be handled by the courts, as they are in even fully libertarian societies. Any person who knew themselves to be infected, or likely to be a carrier, would take extreme measures to self-isolate. (Indeed, anybody with even a cold would stay isolated, not wanting to have to pay for a few days salary for everybody they infect, or a portion of everybody infected by those.)
It would not just be those who knew the infection who would isolate, though. Even if there were only a 1% chance you were infectious, you would start reducing contacts if you knew that you might face expected costs of millions of dollars, and criminal manslaughter chargers if you lost that 1% bet.
Insuring against the risk you expose others to
For most risks, you can buy insurance. In fact, if you want to go driving, where you expose others to a small mortal risk, you are not even allowed to drive unless you get insurance (or post a bond) to cover the consequences of that risk. This is no minor cause, we buy $200B of insurance in the USA to cover that. Of course, driving on the public roads is a licenced privilege, and they have the power to deny it to you if you don't have the insurance. But if you are going to put others to great risk, a risk that you could not necessarily compensate, it can often be required that you have proof that you can compensate it, directly or through insurance, if you want to participate in society.
As the risk of infecting others went up, insurance premiums would go up. With fatal infections, they would go through the roof, and quickly put constraints on what you did if you wanted to get insured at all. In a serious epidemic, your insurance, or your fear of liability, would keep you out of all public gatherings and events, make you want to social distance.
I did some playing around with the numbers for what that liability might cost. There is no one answer -- it depends on the R0 of the virus, your odds of catching it if you don't socially distance, and how liability for those you infect would be split between yourself and the person who infected you. Based on some very rough but plausible estimates, I calculate the liability for not quarantining to be a bit over $1M and 180 counts of participation in negligent homicide Multiply that by your probability that you will get infected if you go out and don't social distance. Put that at 5% and it's about $50,000 and 8 counts of negligent homicide.
In other words, you would not need any law to tell you to lock down. You would do it on your own. Your activity is so risky to others that their rights, and their right to have you punished and forced to pay if you harm them are reasons not to take those risks.
Businesses would lock down earliest
If liability flowed to companies who gathered workers together, or venues who held meetings, they would shut down long before any government order might come. In fact, even the "essential" businesses would shut down unless they had specific exemptions from the liability.
What if the calculations are wrong?
Of course, some will argue, "The current scientific consensus overestimates the risk." This is entirely possible. Insurance companies and governments have little choice but to go with the best available consensus. If you are very wealthy, and very certain, you could take the risk of harm to others upon yourself, perhaps. But perhaps not: If most people lock down because they can't afford it, a small group takes a bigger risk, because now they will be more like Patient Zero -- responsible for most of the downstream infections, rather than splitting that liability among a large group. So they had better be very certain.
Over time, calculations of the real dangers would improve.
Back in the real world...
We're not going to have such perfect infection tracing, short of having surveillance robots in our bloodstreams. We can't sue those who infect us or charge them with manslaughter or negligent homicide. That's where it can make sense to have a government which can enact policies to reflect what would happen if we had a perfect tort and criminal system to deal with the harm caused by breeding the virus and infecting others.
In other words, declaring a lockdown.