When Mr. Poe asks the children to wear blindfolds to the trial because he was instructed to take everything the court says literally, including "justice is blind," Sunny babbles "Scalia." This is a reference to former U.S. Supreme Court Justice Antonin Scalia, a firm believer in the Textualist theory, which states that all laws, even old ones, must be taken literally, regardless of their original purpose or intent.
For the courtroom scene, Violet, Klaus, and Sunny change into outfits left by Justice Strauss in their hotel room. These clothes (Violet's dark dress, Klaus' suit, and Sunny's ruffled floral dress) are the classic Baudelaire looks from the Brett Helquist illustrations of the original novel series' first book, "The Bad Beginning."
In another fourth wall break, Count Olaf says that he hates it when people break into spontaneous musical numbers, although, he says, his opinion on that may change later - Neil Patrick Harris is famous for starring in many musicals, where spontaneous song and dance routines happen all the time.