Two non-invasive cookies are used by Moodle.
The essential one is the session cookie, usually called MoodleSession. You must allow this cookie into your browser to provide continuity and maintain your login from page to page. When you log out or close the browser this cookie is destroyed (in your browser and on the server).
The other cookie is purely for convenience, usually called MOODLEID. It just remembers your username within the browser. This means when you return to this site the username field on the login page will be already filled out for you.
It is safe to refuse this cookie in your browser - you will just have to retype your username every time you log in.