Suppose police are investigating a burglary case. Under law, COVID-19 contact tracing data can only be used for contact tracing and nothing else. However a team decides to analyze the data anyway to collect more information. It ends up playing the decisive role in identifying and apprehending the suspect. The suspect argues that they cannot be charged because the data used to incriminate them was used in a manner contrary to the law. Can their penalty be commuted due to this fact?
Under U.S. law, illegally obtained evidence cannot be used to convict someone of a crime, but if they are convicted anyway, it has no impact on the punishment imposed.
The premise that covid contact-tracing data can by law only be used for identifying possible covid carriers is unsupported, see this. HIPAA limits how medical information can be disclosed by "covered entities", limits what doctors can disclose, and not how police can use information. "Illegally-obtained" evidence would be evidence acquired by the police through an unconstitutional search, and using information volunteered by a third party is not unconstitutional.
The consequence of conducting an illegal search is that such evidence, or secondarily acquired evidence, discovered based from an illegal search (so-called "fruit of the poisonous tree"), is that it cannot be used in court. That means that if this was crucial evidence, there will be no conviction. If, on the other hand, a conviction is secured without relying on it, the court does not then invent a new category of "admissible but reprehensible" evidence and sentencing is not affected.
The question as asked skips several steps between charges being brought against a defendant and a sentence being imposed. Any evidence that is found to have been obtained illegally will already have been removed from the process during early stages of the trial, if not before. In any event, it will happen well before sentencing.
The suspect argues that they cannot be charged because the data used to incriminate them was used in a manner contrary to the law.
The prosecutor might accept this argument and refrain from charging the suspect, or the prosecutor might reject the argument and charge the suspect anyway. If that happens then the suspect -- now defendant -- can make the same argument to the judge. The judge will then decide whether the evidence in question was indeed obtained illegally as the defendant argues.
If the judge finds that the evidence was obtained illegally and there is insufficient additional evidence to support the charge, then the charge will be dismissed and there will be no trial. However, if there is additional legally obtained evidence (and tbe charge is not dismissed for some other reason), then the trial will proceed. The illegally obtained evidence will not be presented to the jury at all.
Can their penalty be commuted due to this fact?
If the evidence is found to have been obtained illegally but the jury nonetheless convicts the defendant then the evidence will also be excluded from consideration in sentencing the convicted party. There is accordingly no need to mitigate the sentence: it was already determined without taking the illegally obtained evidence into consideration.
Evidence that was obtained in a manner that infringes a person's Charter rights is not automatically excluded. See R. v. Grant, 2009 SCC 32.
But if the evidence is found to be admissible, despite the Charter breach, and if the accused is convicted, the facts constituting a Charter breach can still be taken into account at sentencing, if relevant to the circumstances of the offence or the offender.
See R. v. Nasogaluak, 2010 SCC 6, at para 47
... it may, at times, be appropriate for a court to address a Charter breach when passing sentence. ... If the facts alleged to constitute a Charter breach are related to one or more of the relevant principles of sentencing, then the sentencing judge can properly take those facts into account in arriving at a fit sentence. Section 718.2(a) of the Code provides that a court should reduce a sentence “to account for any relevant . . . mitigating circumstances relating to the offence or the offender”. It would be absurd to suggest that simply because some facts also tend to suggest a violation of the offender’s Charter rights, they could no longer be considered relevant mitigating factors in the determination of a fit sentence.
For example, it is likely within the judge's discretion to consider the fact of an unreasonable strip/internal-cavity search that violates the Charter as a circumstance of the offender that may be relevant as a mitigating factor at sentencing. See e.g. R. v. Rodriguez, 2014 ONSC 2928, at para 11, suggesting that had there been a cavity search, this would be the kind of breach that affects the circumstances of the offender.