This expression translates to something like "Joost may/could/might know it" but is used to say that nobody really has a clue (apart from maybe Joost – a common first name in the Netherlands). Note that the construction "mag het weten" is only used in this phrase. Normally you would say "Frank zou het kunnen weten" ("Frank might know it").
Many people wonder who Joost is. Read the Extra for an explanation.
– "Waarom is Frank niet op het werk?" – "Joost mag het weten, hij is al de hele week te laat."
("Why is Frank not at work?" – "I’m blowed if I know, he has shown up late all week.")
– "Joost mag weten waar ik de auto geparkeerd heb."
("Heaven only knows where I parked the car.")
– "Waar is dat rapport over de kredietcrisis?" – "Joost mag het weten, ik heb het al een week geleden ingeleverd."
("Where is that report on the financial crisis?" – "I have no clue, I already handed it in a week ago!")
Apparently Joost is derived from ‘joos’, a word picked up by the Dutch in colonial times on the Indonesian island of Java. ‘Joos’ was a name for a Chinese god (or its depiction), and was in its turn derived from ‘dejos’ (from Portuguese ‘deus’; god). Later ‘joos’ was connected to the existing given name of ‘Joost’ and was in fact associated with the devil. An explanation for the latter could be that the god of one religion is often the devil of another religion (source: "Woordenboek der Nederlandsche Taal" (WNT, part VIII, 1926)).