I didn't really ever get that feeling about SB or Sandy, myself. She would need to make a lot more appearances in the series, and not have her decidedly own hobbies that don't focus solely on the main characters... and she isn't an annoying character.
But, of course, my definition/understanding of "Mary/Gary Sue", is... er, in the context of fanfic/fancomics and such, where they're an author-insert type character with no background and seems to only be in the story for one sole purpose. So, generally something I have to watch out NOT to do if I come up with any stories which include original characters.
Sandy is also a 'flawed' character - she has a temper, for example; She isn't always wrapped up in stories in every plot; she isn't just there to be a love-interest for SB, or any other character. She also interacts with background characters - notably Larry - and does her own things; and, of course, has a bit of a background (not sure how developed it is, but she does HAVE one: A family, a legit reason to even be in Bikini Bottom in the first place).
SpongeBob, well, he's the star of the series, and he has lots of great quirks, great moments. I can see why one might call him a Gary Sue type, specifically in that he is so cheery and tries to get along with everyone and do his best to be 'perfect', but he's way more fleshed out than just a Gary Sue.. he's not that 'typical', at least, IMO.
Someone mentioned his inability to get his boating license; but it also needs to be mentioned that he seems entirely oblivious to the fact that Squidward doesn't appreciate him - seems to even have an odd quirk FOR trying to annoy him; but he's also quite sincere and does seem to honestly consider Squidward to be a star; idolizing him.
I mean, I can see how anyone might feel that way about those two characters, but I really don't share the opinion. Larry's more of a Gary Sue than SB or Sandy. Pearl could also be considered as such, I guess. They're both pretty shallow characters, not well defined and quite predictable. Squilliam could also be a good example of a Gary Sue, as we know nothing about him really, the only role he playes in pretty much all but one episode is to play off Squidward and one-up him (and to show just how incredibly shallow the Bikini Bottomites are in general - I mean, seriously, Squilliam's considered gorgeous but Squidward isn't even a LITTLE bit?). The only episode I can think of where he isn't just fullfilling his sole role, is in 'Back to the Past' - and that's only for like 2 seconds. Don't get me wrong, I love, love, love Squilliam - I think that's been more than a little obvious by now - but I can also critisize his role in the series. He is, sadly, not very fleshed out - and is sort of like more of an 'evil twin/clone' type to Squidward.
But, as said, those are just my opinions - and no one needs to share them and I certainly wouldn't want to try and tell anyone they're wrong. It's also always fascinating to hear other people's thoughts and opinions about such things. It's nice to ponder over them.