The hat is known as a kufi and as Wikipedia describes it:
A kufi or kufi cap is a brimless, short, and rounded cap worn by men in many populations in North Africa, East Africa, Western Africa and Asia. It is also worn by men throughout the African diaspora.
The focus of the Benny Russell plot in “Far Beyond the Stars” is about how he — and African-American writer in New York City in the 1950s — wrote this short science fiction story centered around a black captain who commands a space station and how Benny himself struggles to have this short story published and told. He’s constantly being told/reminded that 1950s America was simply not ready to read the story of a black man being in command of a space station, but he persists because he believes it to be an important tale to tell.
To my knowledge, the act of wearing a kufi by Benny Russell was a simple, passive act by him to assert his African heritage and basic human dignity in a world that saw his African heritage as a negative and did not afford him any basic dignity.
I mean there is that scene in the beginning of the story where they want to get a group photo of the staff of Incredible Tales (the science fiction magazine where Benny works) and he and the women on staff are asked to “sleep late” the morning it will be taken since they don’t want them in the shot. And later on in the episode when he runs into cops on the street, even though he is wearing a full suit and tie, they consider him to be some sort of “janitor” for what reason other than the color of his skin?
To paraphrase comedian Rodney Dangerfield, Benny Russell gets no respect around anyone in 1950s New York City. Even in the office of a science fiction publication he himself works for that finds it just too “crazy” to publish a story of a black captain of a space station. He’s going to wear that kufi because Benny knows who he is—and where he comes from—and he’s simply not ashamed or apologetic about any of it.