You want to be interactive with the table so people are comfortable around you and start gambling more and making mistakes. Casually talking and being a lively personality important, but not huge, in taking down more money (think Mike Caro).
*raises eyebrows*
This may work for a select few players (Daniel Negreanu, for example), but for every player that's good at this there are dozens that are
awful at it and it's actually costing them money because the information they're giving away is counteracting the benefit of being "likeable" (assuming they're even achieving that effect - I've known players who've tried it and gotten it so wrong they've had the opposite effect) and then some.
Long story short - unless you're Negreanu or Caro and you're actually good at that act, it's often better just to fade into the background.
As for the OP and sunglasses, you'll probably find it's a fashion thing as much as anything else. Unless you're a name-brand player who's been doing it for years, players tend to associate the Chris Moneymaker baseball cap and sunglasses look with beginners, and a lot of people don't want to be viewed that way.
Do they work? Meh - I don't bother, they've always made me feel kinda silly. But if they make you feel comfortable, go for it.