Personally, I'd skip the bug spray/sunscreen etc. The problem is that unless people know that you're providing it, they will bring their own in the first place, so it becomes redundant, so you've gone through a lot of effort to provide something that won't get used, and may even be thrown out before leaving if luggage space is tight. Same with clothes or shoes, and then you have size issues.
I'd lean towards edibles. If it's appropriate for your crowd, a bottle of a local drink (plus mixer if appropriate), alcoholic or not, and some snacks. If there are kids, some sort of cheap beach toy or colouring book for entertainment.
The towel idea is a good one, if it's a non-specific design (ie, towels with your wedding date printed on them don't have much re-use value). Another option would be sarongs - I have some I picked up in Thailand, and I love them for vacations - you can use them as a towel to sit on at the beach or on the grass, wear them to and from the pool, make an improvised head covering when riding a camel in the desert, carry stuff in them, and they pack really small and dry really quickly (avoid tie-dyed ones, though, because they leak colour).
I have a mixed view of goodie bag stuff. Part of me gleefully says "Oooh, free stuff!!!", but another part of me recognizes that about 80% of the time the contents of the basket of free stuff eventually gets thrown out unusued.