Can the Judiciary tell the Legislature what to do?

Inspired by the recent NJ decision re gay marriage/unions. Asked in GD but unworthy of answer or lost in the debate:

Is the US Supreme Court allowed to tell the legislature to enact a law to fix a perceived problem? Or is this ability unique to certain states? What if the executive vetoes it and they can’t override it?

Why aren’t the plaintiffs sueing (class action or otherwise) all the insurance companies or any other entity that discriminates to get them to treat committed couples the same? If there are laws that are unconstitutional because they discriminate why aren’t they just overturned?

Since this is the subject of another thread in progress in General Questions, I’m closing this and redirecting you there. samclem