Adding yourself to the docker group so you can drop sudo is step one in many install guides. The official post-install page has a warning right above it: the docker group grants root-level privileges.
sudo usermod -aG docker "$USER"
The reason is simple. Anyone who can talk to the Docker daemon can start a container that mounts the host’s root filesystem and runs as root inside it:
docker run --rm -it -v /:/host alpine chroot /host
That gives a root shell on the host, no password asked. So every account in the group, and every script or app that runs as one of those accounts, can do anything on the machine.
On a home server where you are the only user and you would use sudo anyway, I think the convenience is fine as long as you know what it means. On a shared machine, I would not add other people to the group. Do not add service accounts to it either just so a tool can see containers.
If you need less, look at rootless mode, where the daemon runs as your user, or at a socket proxy that allows only read access for monitoring tools. And the same logic applies to mounting /var/run/docker.sock into a container: that container now has root on the host too.
Further reading: Linux post-installation steps for Docker Engine, Docker Engine security: attack surface of the daemon