Sure they can. There are various legal safeguards in place to prevent a jury decision from trampling on the rights of the defendant. For example, a judge can determine that a finding of guilty by the jury so went against the evidence as to be unreasonable. If a jury finds you not guilty, that's it. However, if a jury finds you guilty that isn't the end of the matter.
A ruling can be overturned because of something that did or did not happen in the courtroom, new evidence, police procedures,etc., but it cannot legally be thrown out because of how the jury arrived at its verdict.
If a jury finds someone guilty just because they're a minority, or a jury relies on outside evidence or sources for its decision, that decision can most certainly be overturned.
Consulting scriptures does not rise to the level of those things.