From the beginning of the novel and throughout, we note that the kids like Ralph. He is kind, logical, confident, and has a good sense of justice. He also is a planner. He is the one who assigns jobs for the kids in order to assure their survival until they are rescued. He is smart enough to ally himself with Piggy, who is also logical and intelligent. They are the thinkers of the island, and the kids are ready and willing to put their fate into Ralph and Piggy's hands...all, that is, except Jack.
Ralph is also elected by the group to be the leader. Probably something in his face, or his mannerisms. He is a good looking boy, tall, and carries himself well. Most leaders have these qualities, and humans look for these qualities in their leaders more often than they look for shorter, unappealing people to take care of things.
Although Ralph stumbles into leadership rather than seeking it, he draws upon his strengths as chief. Qualities that serve him well as leader are that he is popular, principled, kind, hardworking, and responsible.
Ralph's good looks and the fact that he blew the conch are the factors that influence most of the boys to vote for him as chief initially. Piggy is more intelligent, and Jack has more natural leadership abilities, but Ralph's popularity installs him as chief.
Once the boys choose him, he carries out his role ethically. He takes seriously the fact that the welfare of the boys is his top concern and doesn't act out of selfishness. He seeks to follow the morals that British civilization has instilled in him. Therefore he stands up for Piggy against Jack's violence, and he labels the mob's action against Simon as murder.
Ralph's kindness earns him some loyalty; under better circumstances it might have had better results. Unfortunately, given Jack's jealousy and lust for power, Ralph's kindness ends up emboldening his enemies. Ralph feels compassion for Jack at having been spurned in the vote for chief, so he immediately offers Jack a major leadership role to console him. Ralph's desire to allow the boys freedom of expression leads to the talk of beasts at the evening meeting. What started as kindness on Ralph's part deteriorates, allowing Jack to gain strength as he plays on the boys' fear.
Ralph is a leader who is willing to get his hands dirty. He works hard to build shelters, even when all the boys except Simon (and Piggy) run off to play rather than help.
Finally, Ralph is responsible in that he attempts to keep the most important goal--that of rescue--prioritized. At times he begins to lose sight of why they need the fire, but next to Piggy, he is the one boy most able to keep their highest purpose top of mind.
Although Ralph doesn't seek leadership, when it is thrust upon him, he draws on his strengths of popularity, morals, kindness, willingness to work, and responsibility.