I use both methods. If I wanted, for example, to check whether a collision collides with a player, I'd use groups. You can check if a node is in a specific group with:
node.is_in_group("group_name")
and get every node is a specific group with:
get_tree().get_nodes_in_group("group_name")
Collision layers are better if you want certain objects to stop colliding entirely, but still collide with some specified objects. For example, in my game I have a camera that can collide with some objects, but I set up the collision layers so that objects not in the camera collision layer won't collide with the camera.