It/there comes a time when you remember your mistakes.

It/there remais nothing to be done.

Is "there" correct in both sentences?

Yes, “there” is correct for both. Also in your second sentence, the second word should be “remains.”