The Black Sun is a recurring organization in the Star Wars franchise, appearing in both the Canon and Legends continuities. The Black Sun is a criminal syndicate and became the most powerful criminal organization in the entire galaxy during its existence. It rose to prominence during the Clone Wars where the Jedi were unable to deal with them due to the wat and hence, it gained a huge advantage and made profits of off the war effort via illegal dealings and selling of weapons and other illegal items in the black market.
The Black Sun was founded some time between the years 3653 BBY and 3644 BBY in the aftermath of the Great Galactic War. Following the war's end and the sacking of Coruscant at the hands of the Sith Empire, Galactic City soon descended into chaos and anarchy with rioting and looting becoming normal and the Coruscant Security Force was already streched thin in the aftermath of the devistating attack.
Because of this chaos, various gangsters got together in the lower neighborhoods and began seizing the lower levels for themselves. The name Black Sun would show up in sayings such as "better a black sun than none" in reference to the lighting in the lower levels of the planet and thus, the Black Sun crime syndicate was officially born under the name. In little time, the Black Sun quickly expanded and began claiming territory for themselves in the lower levels and used it as a base of operations for their new organization.
Their advancements wouldn't go unnoticed and they were soon stopped a Justicar's Brigade, but the rioting and looting within their own territory had not ceased regardless. In the following years during the Cold War, the influence of the Black Sun had only continued to grow and they had eventually expanded beyond Coruscant itself and began spreading across the galaxy.
As the organization expanded, the Galactic Senate soon found out about their existence and the threat they posed after reports came in of CSF officers of the Special Tactical Unit were seen fighting Black Sun members in an attempt to regain lost territory siezed by them earlier on.
The Clone Wars
Following the outbreak of the Clone Wars in 22 BBY, the galaxy soon found itself once again split apart and divided between the two governments, the Galactic Republic and the Confederacy of Independent Systems just like it was during the Old Republic era between the Republic and the Sith Empire.
The Black Sun had taken full advantage of the conflict to once again expand and grow their influence across the galaxy at a time when the Republic and Jedi were too busy dealing with the Separatists. During this time, the Falleen species rose to prominence as the dominate race that members of the Black Sun were and the organization was effectively under the control of a Falleen cabal sometime during the war.
During the later stages of the conflict, the renegade Sith Lord Darth Maul, rogue Sith apprentice Savage Opress, and Death Watch leader Pre Vizsla traveled to the Black Sun fortress on Mustafar where the three of them approached ruling council to make them an offer they couldn't refuse. They turned it down and Savage responded by killing the entire council except for one Falleen male, Ziton Moj, who took over as the Black Sun's leader and aligned the organization with Maul and the Death Watch, leading to the creation of the Shadow Collective.