Most containers only need to read their config, certificates or media library. A read-only mount makes sure a bug, a bad update or a compromised app cannot change the files on your host.
docker run -d --name web \
-v "$PWD/conf:/etc/nginx/conf.d:ro" \
-v /srv/media:/media:ro \
nginx:alpine
Inside the container, any write to those paths fails with Read-only file system. In Compose the same suffix works in the short syntax, ./conf:/etc/nginx/conf.d:ro, and with --mount you add readonly to the list of options.
I’d start every mount as read-only and remove :ro only where the app complains. A media server that should never delete your films is the best example, and certificates and config folders are close behind.
Some apps write to a folder you would expect to be read-only: they rewrite their own config at startup, or create a lock file next to it. They will crash or log errors with :ro. In that case mount the config file read-only and give the app a separate writable folder for its state, or drop the flag for that one mount.
Further reading: Bind mounts