Let’s just get the obvious out of the way first, yeah? Sokka is a dork. A super dork, and usually plays the comic relief in the show. He can be kind of immature, jealous, and skeptic, but he means well with everything he does and wants nothing more than to see the Fire Nation stopped. He’s very protective of his friends, likely from being left to protect the women and children of the Water Tribe when his father and the war party left. Ever since his mother died, he doesn’t want to see anyone else important to him hurt and will usually stop at nothing to make sure they they aren’t. Being the oldest in the group and having had to take care of everyone else back home, he feels responsible for everyone’s safety and is determined to protect them at all cost. Unfortunately, sometimes, that doesn’t include people within his personal bubble, and others can get hurt in the process. He hates firebenders and doesn’t trust them at all thanks to what happened to his mother, but is shown to be able to change that mentality once Zuko joins their group and teaches Aang to firebend. Others he can trust pretty easily, especially if they’re against the Fire Nation, but it’s difficult for him to accept Zuko at first, as shown with how vehemently Sokka rejected him when he tried to join them.
He’s slightly chauvinistic in the beginning of the series, thinking that Katara and Suki can’t take care of themselves, especially seen during the episode Kyoshi Island, where he mocks the women and says that they can’t fight; then he promptly gets his ass handed to him. However, having trained with Suki and watching powerful women in action, his chauvinist tendencies melt away into mother henning, where he starts babying Suki and making sure she doesn’t come close to harm in the episode The Serpent’s Pass. The fact of the matter is that he cares about her a lot, cares about all of his friends, and though he tries to act all manly, it comes through in everything he does.
Despite being slightly ridiculous and eccentric, Sokka knows when to be serious, and it’s during these times that his maturity is evident. Having been left to protect everyone when the war party left, he was forced to mature early, and he feels responsible for everyone under his care. To that effect, he is pretty much the leader in the group, trying to keep everyone organized and safe. He’s the navigator and tactician in the group, and though some of his plans are utterly ridiculous, they’re crafted with the thought of keeping everyone safe and well. To that effect, the plans that are feasible are rather brilliant, he himself being pretty smart, and hell, he even designed a submarine! Kid’s smart, okay?
That smartness gives him something of an ego, though, but Sokka isn’t afraid to admit his mistakes. He can squash down his pride and ask for forgiveness, as seen in the episode with the Kyoshi warriors, and he readily admits that he has flaws and is open to changing them and takes criticism in stride. He tends to get frustrated when something doesn’t come naturally to him, but he has the willpower to keep at it until he’s good at it. Sokka can also be kind of bullheaded sometimes, and misses the point from time to time, but he means well, even when he teases. He likes seeing his friends smile, and doesn’t mind using his sarcasm and wit to cheer them up a little, even if it makes himself look stupid.
Out of all the people in the Avatar world, probably the one Sokka respects above all others is his father, Hakoda. He admires Hakoda, looks up to and strives to be like him. Hakoda had the strength to set aside everything that was important to him in order to fight, to try to create a better future for his children, and though Sokka was hurt at having been left behind, he tried his best to step up and make his father proud by protecting the rest of the tribe. He never once stopped believing in him, even when Katara was hurt that he'd left, and perhaps the reason he's so protective of Katara and the rest of the group is because of that lingering desire to prove that he's strong enough, brave enough to take care of everyone and see them through safely. Which he does admirably, I might add. He tries to follow in his father's footsteps and will fight tooth and nail for those he considers as being under his protection. He does his best to do what he thinks would make Hakoda proud, in order to be a warrior who can stand tall and proud next to him as an equal.
If not for Suki, there's a good chance that Sokka would still be at least slightly chauvinistic and think that women can't take care of themselves, despite how many times Katara and Toph have proven themselves. Suki and the other Kyoshi warriors taught him that not only can women fight, they can be just as brave and strong and admirable as male warriors, and it humbled him when Suki beat him in one-on-one combat. And if not for Zuko helping them later in the series, he probably never would have accepted firebending whatsoever. He still bears a grudge, and likely always will, for the Fire Nation's murder of his mother, and that transgression coupled with the atrocities they committed against the other nations is unforgivable to him. Aang's inherently kind nature helps him understand that maybe he should give everyone a chance to prove themselves, and even though he doesn't trust Zuko at first (thanks to the whole doggedly chasing them around the world and sending Sparky Sparky Boom Man after them), he doesn't reject him outright. He is able to allow Zuko to prove that he is trustworthy, and once he finally accepts him, Sokka's hatred of firebenders is somewhat lessened, finding that not all of them are truly terrible people.
Being surrounded by the Avatar and masters at waterbending and earthbending, Sokka also comes to terms with his own normality - that is, his being unable to bend anything, and it makes him feel useless and plain. What chance does a guy with a boomerang stand against someone who can move the elements? However, rather than being detrimental to his self-esteem, the realization prompts him to become better, someone who is strong enough to stand beside a bender without possessing the same abilities as they do. At the beginning of the series, he doesn't necessarily believe in or trust bending, but seeing the amazing things that Katara, Aang, and Toph can do through out the series changes his mind, and though an envy of their abilities is born, it is also assuaged in the episode Sokka's Master, where he studies under Master Piandao to become an expert swordsman - the only one in their group. And so, his own special talent is recognized, and though he may not be able to bend, he can still stand tall and proud beside the other fighters in the group.
For the most part, Sokka's silliness is just in his nature. Even if he was put in a situation where he was forced to assume heavy responsibilities early, he's still a fifteen year old boy [eighteen for my purposes here] and he still has some of those immature mannerisms. Most of the time, his goofiness is a direct result of his trying to be serious. Either he says something completely off the wall, something happens to derail the seriousness, or he's serious about the wrong thing. He's also the butt of a lot of the series' jokes: he's always getting splashed with viscous fluids, everyone tends to make fun of him because he isn't a bender, and bad things just seem to happen to him. He takes it all in stride, though, and uses his wit and sarcasm to liven the group up. For example, in the eipsode "Sokka's Master" when Sokka goes to train with Master Piandao, Toph, Katara, and Aang are shown as just lying there bored, trying to make jokes to entertain each other. Needless to say, they fail pretty bad, and the first thing he says upon returning - "Sokka! Say something funny!" "Funny how?" - they all absolutely crack up at. His humor is an integral part of him, and he likes using it to keep his friends smiling.
Usually, his reactions are a little excessive and ridiculous, but they add to that funny part of him. For example, his face constantly changes, going to the extremes of every emotion no matter what he's feeling, and he has a particular tendency to yell when confronted with something particularly absurd, whether it's in excitement, disagreement, or disbelief. It adds to his being recognized as part of the comic relief, and makes him all the funnier.
Oh. And he really, really likes meat.