Children with vivid imaginations often fantasize about achieving extraordinary and fantastic milestones, like being sorted into a Hogwarts house or being drafted into the Justice League - unsurprisingly, those fantasies don’t always fade away when children grow up. As such, the notion of seeing Justice League members sorted into Hogwarts houses is enough to set the mind of any Harry Potter or DC fan running wild. Even though an education in witchcraft and wizardry might seem a bit redundant to characters like Green Lantern or Wonder Woman, that doesn’t mean the Sorting Hat wouldn't have some ideas about who should go where.
The four houses of Hogwarts - Gryffindor, Hufflepuff, Ravenclaw, and Slytherin - aren’t just the wizarding equivalent of fraternities and sororities; they’re lifelong affiliations that are based on one’s inner self and truest qualities. Every fan of the Harry Potter franchise has an opinion about which house is best, but the traits that define the houses are clear and distinct, making sorting easy, even for fictional characters.
Barry Allen's overall do-good nature may lead some to sort him into Gryffindor, but Hufflepuff is where he truly belongs. Hufflepuffs are generally upstanding citizens who value fair play and patience, and the Flash is likely the superhero who treats his opponents with the most care and empathy.
He seems to truly believe that anyone can be rehabilitated, a distinctly Hufflepuff line of thinking. Hufflepuffs place a high degree of importance on hard work and, given the amount of calories he burns while using his powers, the Flash is arguably the hardest-working Justice League member.
Wonder Woman was raised from a young age to represent the best qualities of humanity, which makes her a natural Gryffindor candidate. Although “chivalrous” might not be the most obvious term to describe Wonder Woman’s personality, she is an exceptionally kind individual who has dedicated her life to aiding those in need.
Wonder Woman - as a true hero and feminist icon - has demonstrated ample daring and nerve throughout her superhero career. However, despite her virtues, Diana of Themyscira loves an occasional scrap, like many Gryffindors.
Being a Ravenclaw is all about intellect, something Cyborg has in spades. Since his mind and much of his body have been replaced with technology, Cyborg is a walking, talking supercomputer, which would make him an incredibly valuable Ravenclaw asset.
Ravenclaws focus on the pursuit of knowledge and intelligence, sometimes to the point of emotional detachment - an issue that Victor Stone has dealt with since the incident that launched his superhero career. Some of the best wizard inventors have belonged to Ravenclaw, and Cyborg frequently creates new gadgets to aid the Justice League - often from his own body’s components.
Ravenclaws are often characterized as being so obsessed with knowledge and intelligence that they lose touch with their humanity, so it makes sense that a non-human character would end up in the house.
Martian Manhunter values logic and understanding above all, something that the Ravenclaw house definitely appreciates. J’onn J’onzz possesses a genius-level intellect and photographic memory, so he would easily obtain the high grades that Ravenclaw expects, and then some. Not to mention he'd probably be decent at Quidditch.