Considering I work Beach Patrol at Manasquan, that is my job to make sure you have them.
Yes, they are only needed for guarded hours. No discount for locals. Surfers have to have them. Daily tickets are $6 weekdays and $7 weekends/holidays at Manasquan. Yes it is a ticket-able offense, but we come up to you first and unless you give us a hard time, you won't get one. If you get pissy and start cussing we'll call a cop for you

Then you'll have to pay, and then probably get kicked off the beach. I recommend just paying to begin with.
Lastly, unlike other states, New Jersey Government does not give the towns a budget for the beach. That means that the lifeguards and beach crew (people who pick up trash) would not get paid, so each town has to make its own budget (selling beach badges and requiring them to get onto the beaches). Different towns run different rates, and some towns do not require them (Towns that can afford the budget without tourist profit)
Edit: GoinRetro: Personally me and the badgecheckers make sure they have badges more than just normal looking tourists.