I'm also interested in the role of Black and other people of color in science fiction stories. How difficult would it have been to get a story about a black man published in a pulp magazine in the 50's.
What might be the first African-American science-fiction story was Martin R. Delany's Blake; or, The Huts of America which was serialized in the Anglo-African Magazine (Jan-July 1859), although this was before science fiction was quite recognized as such, the eponymous Blake as an intelligent free black man who uses his technical knowledge and inventions to free himself and his family from slavery is a precursor to many similar figures. Lisa Yaszek in Black and Brown Planets compares this to Sutton E. Griggs' Imperium in Imperio (1899), Pauline Hopkins's Of One Blood; or, The Hidden Self (1903), Edward A. Johnson's Light ahead for the Negro (1904), Roger Sheman Tracy's The White Man's Burden: A Satirical Forecast (1915), and Geoge S. Schuyler's Black No More (1931) and Black Empire (1936-38).
The pulp magazines of the 1920s and 30s were not colorblind, unfortunately. Predominantly, the characters, authors, editors, artists, and even the fans were white or assumed to be white. As Samuel R. Delany put it in his critical essay "Racism and Science Fiction":
For better or for worse, I am often spoken of as the first African-American science fiction writer. But I wear that originary label as uneasily as any writer has worn the label of science fiction itself. Among the ranks of what is often referred to as proto-science fiction, there are a number of black writers. M. P. Shiel, whose Purple Cloud and Lord of the Sea are still read, was a Creole with some African ancestry. Black leader Martin Delany (1812–1885—alas, no relation) wrote his single and highly imaginative novel, still to be found on the shelves of Barnes & Noble today, Blake, or The Huts of America (1857), about an imagined successful slave revolt in Cuba and the American South—which is about as close to an sf-style alternate history novel as you can get. Other black writers whose work certainly borders on science fiction include Sutton E. Griggs and his novel Imperio Imperium (1899) in which an African-American secret society conspires to found a separate black state by taking over Texas, and Edward Johnson, who, following Bellamy’s example in Looking Backward (1888), wrote Light Ahead for the Negro (1904), telling of a black man transported into a socialist United States in the far future. I believe I first heard Harlan Ellison make the point that we know of dozens upon dozens of early pulp writers only as names: They conducted their careers entirely by mail—in a field and during an era when pen-names were the rule rather than the exception. Among the “Remmington C. Scotts” and the “Frank P. Joneses” who litter the contents pages of the early pulps, we simply have no way of knowing if one, three, or seven or them—or even many more—were not blacks, Hispanics, women, native Americans, Asians, or whatever. Writing is like that.
Black characters in early science fiction, fantasy, detective, weird, spicy, and romance fiction tend to be either supporting or antagonists, and many of the characterizations were outright racial stereotypes and baldly racist stock characters...although there are exceptions. Robert E. Howard, who created the character of Conan the Barbarian, also created the black boxer Ace Jessel in "The Apparition in the Prize Ring" (Ghost Stories, Apr 1929).
As with many of Howard's depictions of race, the issue is complicated: Jessel is the picture of the "good Negro" - diffident to white people, polite, "knows his place" - and is contrasted against "Mankiller" Gomez, who is represented as brutal, vice-filled, dangerous, savage, and straight from Africa. So the story is not so much an example of a white writer creating a sympathetic black character as it is a white writer contrasting two different visions of what a black character could be. Neither was free from stereotype or prejudice.
Racial tensions influenced the burgeoning pulp magazines, sometimes directly, sometimes obliquely. The "race question" was often one that science fiction writers largely left unasked and unanswered; the stellar empires of Leigh Bracket, Edmond Hamilton, and Isaac Asimov generally didn't address the issue of race; Jim Crow did not extend to Mars because there were often no reference of black people on Mars. The future became a "mythic white space," as William Gibson famously envisaged in "The Gernsback Continuum," where white, blond, blue-eyed healthy-looking science heroes looked like they'd stepped out of a Hitler Youth advertisement. Charles Saunders famously described "outer space...as segregated as a South African Toilet." (quotes in Race in American Science Fiction 14). There were no black astronauts.
So, if you picked up an issue of Analog Science Fiction and Fact, Galaxy Science Fiction, The Magazine of Fantasy & Science Fiction, or even Weird Tales in 1953, you most likely wouldn't find a black protagonist. The same would be largely true for comic books, which were descendants of the Pulps...with one notable exception: the infamous comic book story "Judgment Day" (Weird Fantasy #18, April 1953) where the astronaut removes his helmet at the end to reveal himself as black was subject to censorship - which the publisher famously denied, printing the story as-is.
Things would change. Racial politics became more prominent in the 1960s and 70s in the United States, and this would see some reflection in science fiction. More importantly, you had more young African-Americans reading science fiction and fantasy that would grow up to add their own voices: folks like Samuel R. Delaney, Octavia Butler, and Charles Saunders. Outside of science fiction and fantasy, black writers like Chester Himes were heavily influenced by Black Mask and other crime pulps.
Mainstream science-fiction (in the US at least) was quite substantially latently white supremacist (at least as much as mainstream literary fiction, perhaps more) up until about the 1960s, black characters as anything other than villains or lower class workers were few and far between.
To provide some background for people stumbling into this thread without knowledge of Star Trek: Deep Space Nine (DS9) and the episode "Far Beyond the Stars" I should mention that the show is based around the (Federation) crew of an important space station. The head of the station is Captain Benjamin Sisko, a black man who was born on Earth. During the episode Sisko has a dream/vision of being a science-fiction writer (Benny Russel) in 1950s(ish) New York City. Benny Russel is also a black man, but the readership of the magazine he writes for doesn't know that. The core of the episode revolves around Benny being inspired to write a story that is essentially the DS9 story, centering around captain Sisko, a black man commanding a space station in the 24th century. Despite resistance from his boss, Benny submits his story for publication in the magazine with some modifications to soften the impact (making it a dream). Nevertheless, the owner of the magazine (an unseen character who remains off screen the entire episode) decides to destroy the entire print run of the magazine for that month instead of allowing Benny's story to be printed.
Much of this episode was inspired by events related to the publishing of the comic "Judgement Day" by EC Comics in 1956. In that comic an astronaut from the "Galactic Republic" visits a planet inhabited by robots, who are racially divided into otherwise indistinguishable "orange" and "blue" races, with one "race" dominant and the other subservient and discriminated against. At the end of the story the protagonist files his report that the planet should not be admitted to the Galactic Republic until it resolves its problems, then he removes his helmet (which had been on throughout the comic, hiding his face) and is revealed to be a black human man, implying both that it is set in the future and also that Earth has solved its problems with racism at some point previous to the future depicted.
At the time most comics were subject to the Comics Code Authority, a form of self-regulation imposed in 1954 to avoid government regulations after a massive freakout, moral panic, and senate hearings immediately following the publication of the book Seduction of the Innocent. Anyway, the administrator of the CCA at the time (Judge Charles Murphy) objected to the story and demanded that the revelation of the main character as a black man be removed. There was no basis whatsoever for this objection within the comics code guidelines, it was simply an abuse of power by the administrator. In this case the comic publishers (EC Comics) fought for the story, threatened to sue the administrator (remember, the CCA was a voluntary self-regulatory body), and the story ended up being published without modification. It's unclear exactly what additional fallout the publisher received (from the rest of the industry, from investors, and from its readers) from having published the story but they did stop publishing comic books after the issue that ran Judgement Day.
Black main characters absolutely existed in speculative fiction stories before the civil rights era. For example, WEB Du Bois wrote the short story "The Comet" in 1920, which had a black main character. However, as a rule these stories tended to be by black creators for almost exclusively black audiences, they were not part of the "mainstream".
A notable side story here is Chester Himes' "Harlem Detective" novels, published in the late 1950s, in France (where Himes had immigrated to) and in French. His books did not achieve success in the US at the time (and I'm not even certain they were published there until much later), and they are hardboiled police detective fiction, not SF, but it's a useful datapoint in how difficult it was to get stories with black main characters published (let alone read) in the US at the time.
As the saga of "Judgement Day" illustrates, publishing SF stories in mainstream (or even near mainstream) media with prominent black characters was very much an uphill battle in the US up through the 1950s and early '60s. Indeed, even the original Star Trek TV show was blazing new trails when it presented the character of Lt. Uhura as a capable black woman who was not in a subservient or underclass role on the bridge of the Enterprise in 1966.
In short, the situation portrayed in "Far Beyond the Stars" was generally accurate for the time. Publishing a story in a mainstream pulp SF magazine with a black main character would not have been easy. However, through the 1960s and after it started to get easier. Samuel R. Delaney, for example, began writing SF novels in the early 1960s, many with black characters, and they received a great deal of commercial and critical success, receiving numerous nominations for the Hugo and Nebula awards through the 1960s and winning the Nebula award with Babel-17 and The Einstein Intersection in 1966 and 1967, respectively.
Worth noting that the episode presented an utterly ahistorical (or in plainer language made up) view of how sf magazines got put together, even though some of the writer characters seemed to have intentional resemblance to real writers. They did not have, in effect, a "writer's room". Writers sent in stories and editors would publish them. It did happen, but only seldom did a writer ever write a story based on a cover.