For background, Jeffrey Epstein is a former hedge fund manager who has long-standing friendships with various wealthy and powerful people, including Bill Clinton and Donald Trump.
In 2005, a 14-year-old girl alleged that Epstein had molested her at his home in Florida. Local police begin an investigation, and find evidence of widespread procurement of young girls for sex with Epstein, and possibly with others. The case goes federal in late 2006 once it's clear that girls from other states were involved as well (and there was also apparently some concern that the local district attorney was being too lenient).
By late 2007, negotiations with federal prosecutors were in full swing. But the assistant US attorney at the time offered an amazing deal. Epstein would plead guilty to two state charges and serve a mere 13 months in prison and register as a sex offender. But the deal granted immunity to any co-conspirators that could be discovered in the future. Not only that, but the parties agreed that the terms of the agreement would be kept secret from everyone, including the victims.
It's this last part that prompted this most recent ruling. A federal law called the Crime Victims’ Rights Act requires that victims of a crime be allowed to go over the terms of any possible plea deal with prosecutors. This wasn't done, and prosecutors instead deliberately hid the terms from Epstein's victims.
The US attorney involved in all this was none other than Alex Acosta, who is currently Trump's Secretary of Labor and who was reportedly on the short list to replace Jeff Sessions as AG (but has since been eliminated as a candidate).