I think this is referring to
An eye; specifically, the iris.
A moat sits on a hill, in a desert, around a black abyss.
The hill is the dome of the eyeball. The desert is the white of the eye. The black abyss is the pupil.
By light the tide comes in, and by night the tide goes out.
With more light, the pupil shrinks and the iris appears bigger. With less light, the pupil expands and the iris appears smaller.
The moat is never emptied, the abyss is never filled, and the desert is never green.
Though the pupil expands and contracts, neither the pupil nor the iris never disappears completely. The white of the eye remains white (not green).
The waters are often muddy, but rarely blue, and sometimes green.
Most often, eyes (irises) are brown, but sometimes blue or green.
There is no passage from the desert to the abyss --the moat a perfect, unbroken circle, with no bridge and no crossing.
The iris completely surrounds the pupil. You have to cross it to get from the pupil to the white of the eye.
Only one thing may enter, never to escape.
Light is the only thing that can enter, and once it is absorbed by the eye, it doesn't leave.