Using HTTP-only cookies for session management enhances security by restricting access to the cookie from client-side scripts. This helps prevent cross-site scripting (XSS) attacks as the cookie data can only be accessed by the server, thereby safeguarding sensitive information contained in the session.