I would like to know what does "a revised version of this preprint was accepted for the journal ESD." mean? Does it mean that there is 100 percent chance that the revised version of this paper will accepted and the final paper will also be accepted? Or there is a chance of getting the paper rejected?
It means that in the time interval from when the preprint was uploaded and now, the paper has been revised and this revised version has been accepted for publication at the journal. In other words, the revision and acceptance have already happened, though the journal may not (or may) have published it yet.
"Accepted by X" means the revised article has made it through peer review and will be published by journal X, unless some very unusual and unforeseen circumstance arises (for example if it is discovered there is a major problem that invalidates the entire paper which was missed by the referees). The accepted version may still be slightly different from the published version due to edits made in the proof stage (e.g., copy-editors may find typos or undefined acronyms).