Is there any situation where a court might order someone to reveal their ssn? Has this happened and what justification was given?
Under federal law, a government may not "deny to any individual any right, benefit, or privilege provided by law because of such individual’s refusal to disclose his social security account number", but outside of that, there is no national prohibition against governments (any branch) collecting ans disclosing SS numbers. There are some state laws regulating collection or use of SS numbers, but nothing specific to SS numbers in Nevada.
NRS 239B.030 limits government power to collect personal information to some extent, but that includes name and address (courts can require you to state your name). However, the law also limits disclosure
(a) To carry out a specific state or federal law; or (b) For the administration of a public program or an application for a federal or state grant.
There is no law that requires disclosure of SS numbers, so by this state law that information may not be disclosed. But it can be collected; and the court has the power to require a person to provide their SS number to the court (not a generic "reveal"), setting aside protections against self-incrimination.
Can a court order reveal an ssn?
Yes, although the legitimacy of such order strongly depends on the claims/charges at issue.
That being said, the party may (and should) file a motion to have the records sealed, since the public disclosure --insofar as court filings are public records-- of a SSN is extremely unlikely to advance "the interests of justice" in the claims at issue.