First of all, the relevant portion of the Solomon Amendment itself, for reference:
(b) Denial of funds for preventing military recruiting on campus.--No funds described in subsection (d)(2) may be provided by contract or by grant (including a grant of funds to be available for student aid) to an institution of higher education (including any subelement of such institution) if the Secretary of Defense determines that that institution (or any subelement of that institution) has a policy or practice (regardless of when implemented) that either prohibits, or in effect prevents--
(1) the Secretary of a military department or Secretary of Transportation from gaining entry to campuses, or access to students ... on campuses, for purposes of military recruiting; or
(2) access by military recruiters for purposes of military recruiting to ... information pertaining to students ... enrolled at that institution (or any subelement of that institution).
And here is what the district court called a "typical law school non-discrimination policy":
[The Law School] is committed to a policy against discrimination based upon age, color, handicap or disability, ethnic or national origin, race, religion, religious creed, gender (including discrimination taking the form of sexual harassment), marital, parental or veteran status, or sexual orientation.
Although the federal government (largely driven by the courts over the years) has recognized certain "suspect classifications" in discrimination cases, as enumerated in the policy above, sexual orientation is not one of them. The central claim made by the plaintiffs here is that the Solomon Amendment is unconstitutional because it violates their freedom of speech and other more particularized rights the Supreme Court has read into the First Amendment in recent decades, specifically, academic freedom and expressive association, the latter of which the Court addressed in
Dale v. BSA, the Boy Scouts case of several years ago.
When a statute is alleged to be unconstitutional, the courts, depending on the circumstances and the situation of the plaintiffs, apply various levels of judicial "scrutiny." Under what is known as "rational basis scrutiny," the government need only show that the statute is "rationally related to a legitimate government interest." Accordingly, statutes subjected to rational basis scrutiny carry with them a strong presumption of constitutionality, and the government nearly always prevails in such instances.
At the other end of the scale exists "strict scrutiny." Strict scrutiny is employed especially when the statute in question implicates fundamental rights guaranteed to the plaintiff by the Constitution. Under strict scrutiny the government must show that its actions are "narrowly tailored to serve a compelling governmental interest, and must use the least restrictive means of promoting the Government's asserted interest." Strict scrutiny carries with it a strong presumption of
unconstitutionality. It's a formidable obstacle to the government, and the government rarely prevails.
In a nutshell, the district court, in finding for the government, applied rational basis scrutiny to the plaintiff's claims, whereas the 3rd Circuit, in the course of overruling the district court and finding for the plaintiffs, applied strict scrutiny. The district court relied heavily on the Constitution's various provisions empowering Congress to raise and maintain military forces, whereas the 3rd Circuit gave far greater weight to the plaintiff's allegations that their fundamental constitutional rights were impaired by the Solomon Amendment.
The thing is, it's not the military's policy against recruiting gay people that's at issue here
per se, but rather the Solomon Amendment and its effect on the law schools' anti-discrimination policies, and thereby their right to expressive association. The Court has never recognized sexual orientation as a "suspect classification," as it has with ethnicity, religious affiliation, race, and so on, but perhaps it will address the issue this fall.
Justice Scalia, for example, thinks it's a joke, but given Judge Roberts's involvement with
Romer v. Evans, as noted above, it's perhaps a bit more difficult to predict his inclinations on the matter.