For those who don't really know how the judiciary works, the US Supreme Court is the FINAL arbiter of every law, every policy, every domestic decision taken by either the legislative or executive branches. The Supremes don't have a lot to say regarding foreign policy but for everything else - game on.
The way the justices decide depends on how the justice looks at the Constitution and the United States in general. For justices who look at the Constitution as the rule book - the only operating guidelines for the judiciary - the justice will have his or her clerks review the Constitution itself, the Federalist papers a bit for background, decisions from the lower courts and law review articles to determine (1) if the action in question was allowed under the Constitution and (2) if allowed, does it meet the rules for such action.
In deciding if a law or other action taken by another branch (delegation of authority to an agency, executive orders, for example), the Court will determine if the action intrudes on a Constitutionally protected right. The most common are the right to be free from unreasonable government intrusion on our property and papers, the right of free speech, freedom of religion, freedom from racial or other discriminatory practice directed at a protected characteristic or action, right to a trial by jury, and privileges (against self-incrimination, attorney-client, pastor-penitent).
If a law or regulation intrudes on a protected Constitutional right, then the court adopts something called "strict scrutiny." Almost no law can withstand strict scrutiny since the law or regulation must advance a compelling state interest and must be as narrowly tailored to achieve that end as possible. Law school professors use the phrase, "strict in theory, fatal in fact," meaning that strict scrutiny almost always is fatal to the law or regulation.
A law or regulation which impedes a non-constitutionally protected right - such as a affecting a non-designated category such as gender or marital status or commercial speech - gets something called "intermediate scrutiny." To pass this test, the law or regulation must further an "important" government interest, rather than a "compelling" state interest, and must do so in a fashion that is "substantially related" to the important government interest. For example, a fitness test for police force applicants that is more difficult for women to pass will be subject to this intermediate scrutiny. The court will examine the test to see if in fact it furthers the government interest.
The final and lowest category of evaluation is something called the "rational basis test." That test requires only that the law or regulation can rationally advance a government interest. That is the test used for every law or regulation on commerce and taxes. I cannot even think of a law that would fail this standard.
You may note one Constitutionally-protected right that I did not mention - the 2nd Amendment. The courts now supposedly given 2nd Amendment rights "intermediate scrutiny," but in practice actually use the toothless rational basis test.
Liberal justices do not restrict their purview to rights listed under the Constitution, or examine government action in such a rigid fashion. Instead, the liberal justices take the position that the Constitution must evolve with the times, as it is a "living" document. The problem with that approach is that such justices can do any damn thing they want. They can invent rights, or eliminate specifically-listed rights (2nd Amendment), or approve blatantly discriminatory rules and laws (bias in college admissions based on race or gender). They have no guard rails. They look at themselves as Plato's philosopher-kings, all-knowing, all-seeing, all-powerful.
That is why they **** things up so badly.