Which data is written and stored in the database when read-only (non-posting, non-commenting) users visit the site?

I think WP out-of-the-box does not write or store any data for non-logged in users.

WP – again by default – does not write log files, that is an optional config defined in the wp-config.php file.