Is there ever an instance where “prior to” will clear up an ambiguity created by “before”? Or can “before” always be substituted (with minor revision) for “prior to”?
“You will appear before the judge” could be interpreted as “appear prior to” or “appear in front of.” Is that what you’re asking?
In normal modern usage, I’d say they are almost perfect synonyms. (Aside from the rare occasions when “Prior to” is beginning the title of the head of a monastery, as in "Brother Dunstan, Prior to the Community of St. Philip’s Norwich House). It’s worth remembering that, historically “before” sometimes had the alternate meaning of “in front of”, as in “The five valiant knights stood before the gate of the castle they had sworn their lives to defend.”
ETA: Notice that “beofre the court” or “before the judge” preserves this archaism, as deacdan suggests.
I question this. The use of before in the positional sense of “in front of” is probably declining, but still a long way from archaic - few would raise their eyebrows at “You are to appear before the court on Thursday at 10 am” or “Golden fields lie out before me”.
And there are other meanings for “before”, such as “With her, fashion comes before practicality.”
I would say that in more formal situations like business contracts and litigation “before” is more often positioning and “prior to” more often preceding in time. Checking both over at onelook.com it isn’t clear but “before” seems to be winning in commonplace usage.
The use of a the world “before” used to confuse me when I was a kid. For instance, I would hear, “All In The Family, was filmed before a live audience.” I thought this meant, they filmed it BEFORE they showed it to a live audience. (They actually did this, but then they said “All In The Family was played to a audience for live responses.”