1. Maybe God knows but I don't know and no one else knows. — Often used with "only".
Do you know where Susan is? God only knows!
2. Surely; certainly.
Goodness knows, the poor man needs the money.
Heaven only knows, I have tried hard enough.