Is there any difference in meaning and usage between the phrase who knows and who is to know? For example:
Maybe in ten years people will settle on Mars. Who knows?
Maybe in ten years people will settle on Mars. Who is to know?
Your first example uses the phrase Who knows? correctly. It's a rhetorical question -another way of saying that nobody knows whether people will settle on Mars in ten years.
Your second example is not idiomatic in this context. Who is to know is a way of asking rhetorically who will find out. It suggests that nobody will discover who is responsible if some undesirable or unlawful act is carried out.
Let us take the money from the purse; who is to know?
Cash the lottery ticket we found; who is to know?
Nobody will see if you slip the book into your pocket; who is to know?