I always bring something if it's family or friends. But I've also learned to ask if I don't know the host/hostess that well & follow their requests
Here is what I recently learned in one ex.. DS 8's soccer team ended their season before school let out. One of the mom's invited the whole team for a pool party/end of season party at her home.
I really didn't know this mom other than "hi etc". I offered to bring something & she politely told me that they were providing all the snacks & drinks including planned activities & did not want anything "outside" brought, just our company.
I felt weird not bringing anything but since we were e-mailing & I wasn't the only one who asked & was politely told not to, I decided just to bring DS to the party.
Day of pool party, a few of the other mom's brought snacks & juices & one a pool toy (they also got the same message I did) & these were politely returned/refused on arrival by the host mom. Turns out the mom is very big on organic, no preservatives , no violent play etc. So the Capri Suns, cupcakes & water cannon toys were promptly rejected. I felt bad for these moms because they were embarrassed.
But from now on if I don't know you, I ask & listen