(covers information from several alternate timelines)
Krall, formerly Balthazar M. Edison, was a Human male who served in the United Earth Military Assault Command Operations and later the Federation Starfleet, until he was stranded on the planet Altamid. Edison became the brutal warlord Krall after the use of energy transference technology severely mutated his body. As Krall, he despised the ideals of the Federation and sought its destruction.
United Earth Military career
Edison served in MACO, a branch of the United Earth Military, in the 22nd century. He began his service history as a boot camp officer where, as a soldier, he was trained in survival strategies and tactical analysis. After he was promoted to major, he served in force command under Captain T. Ginwald. As an acting colonel, he served as a lieutenant under the command of Captain T. Pine. He fought in both the Xindi and the Romulan wars, during which he witnessed millions of Humans perish by alien hands. (Star Trek Beyond)
Following the founding of the Federation, MACO was dissolved. Edison became a Starfleet officer and was given command of the USS Franklin as Captain. While Starfleet likely considered this promotion to be a reward for Edison's work, unknown to them Edison deeply resented what he saw as being put out to pasture, his calling as a soldier rendered obsolete by the Federation's embrace of diplomacy and tolerance. Despite this, he led his ship and crew on many missions for Starfleet using his tactical training and knowledge of advanced combat to successfully complete those missions.
In 2164, the Franklin was displaced by a wormhole while inside the Gagarin Radiation Belt. The ship crashed on the distant planet Altamid, with Edison, Anderson Le, and Jessica Wolff as the only survivors. Edison sent out a distress call but, receiving no response, came to believe that he had been abandoned by the Federation. As his resentment festered into violent hatred, Edison resolved to destroy the Federation and prove that peaceful coexistence led only to weakness. (Star Trek Beyond) It was not until 2255 that Starfleet had him formally declared missing in action. (Star Trek Beyond – database graphic)
Stranded on Altamid
On Altamid, Edison found technology left behind by a previous civilization, including Swarm ships, a drone workforce, and an energy transference process that allowed him to "drain" other individuals to prolong his own life. Using their newly-acquired Swarm, Edison, Le, and Wolff captured scores of alien ships and drained their crews to survive, which also mutated their biology to resemble that of their victims. In time, Edison became "Krall", suppressing much of his Human identity and ceasing to speak in English.
Searching for the Abronath
Krall learned that the natives of Altamid once created a super-weapon called the Abronath, which they had split in two and launched into space. He located one piece after decades of work, but not the other. (Star Trek Beyond)
Raid and destruction of the Enterprise
In 2263 in the alternate reality, Krall discovered from Starfleet logs, accessed through a captured Magellan probe, that the second piece of the Abronath had been placed into storage on the USS Enterprise. He dispatched Wolff, now "Kalara", to lure the Enterprise to him.
Upon the arrival of the Enterprise at Altamid, Krall attacked with his Swarm. He destroyed the Enterprise, captured most of the crew, and eventually coerced Ensign Syl into relinquishing the second Abronath piece. His weapon complete, Krall departed Altamid with his Swarm to wipe out all life from the nearby Starbase Yorktown, whose multicultural population he saw as the epitome of the Federation's degeneracy. (Star Trek Beyond)
Attack on Yorktown
Krall's Swarm overwhelmed Yorktown's defenses and was on the verge of breaking inside when he was engaged by the Franklin, commanded by the Enterprise's former captain, Captain James T. Kirk. The Franklin, and later the starbase, used a VHF radio broadcast to disrupt the Swarm's internal communications network and destroyed most of the craft. Krall managed to enter Yorktown, but the Franklin physically stopped his ship short of his destination.
Having drained many Enterprise crew members before and after the battle, Krall had regained much of his Human physiology and was thus able to disguise himself as a Starfleet officer. This allowed him to make his way, unimpeded, to the central atmospheric processor on Yorktown, where the Abronath's effects would be disseminated throughout the station. He was intercepted by Kirk, and the two fought while Montgomery Scott redirected the processor to vent into space; Kirk then ejected both Krall and the Abronath out of Yorktown. Shortly after, Krall was consumed by the Abronath, leaving only the Starfleet insignia from his stolen uniform. (Star Trek Beyond)
"I am Lieutenant Nyota Uhura of the USS Enterprise. And you have committed an act of war against the Federation."
"Federation?! Federation is an act of war."
- - Nyota Uhura and Krall, on Krall's actions (Star Trek Beyond)
"Your captain… Why did you sacrifice yourself for him?"
"He would have done the same. And if he made it off that ship, he will come for us."
"I am counting on it, Lieutenant Uhura."
- - Krall and Uhura, regarding James T. Kirk (Star Trek Beyond)
"This is where the frontier pushes back."
- - Krall, to Uhura (Star Trek Beyond)
- - Krall, on seeing the Franklin (Star Trek Beyond)
"Captain's log, I don't remember the stardate. All distress calls unanswered. Of the crew, only three remain. I WON'T ALLOW IT! The indigenous race abandoned this planet long ago. They left behind sophisticated mining equipment and a drone workforce. They have some sort of technology that prolongs life. I will do whatever it takes for me and my crew. The Fed-Federation do not care about us. You'll probably never see me again. But if you do… be ready."
- - Balthazar Edison's final captain's log (Star Trek Beyond)
"What happened to you out there, Edison?"
"Edison? I have to say, Kirk, I've missed being me. We lost ourselves but gained a purpose! A means to bring the galaxy back to the struggle that made Humanity strong."
"I think you underestimate Humanity."
"I fought for Humanity! Lost millions to the Xindi and Romulan wars. And for what? For the Federation?! To sit me in a captain's chair and break bread with the enemy!"
"We change. We have to. Or we spend the rest of our lives fighting the same battles."
- - Kirk and Krall, on Humanity (Star Trek Beyond)
"You lost. There's no way for you to make it back there! Give up!"
"What, like you did?! I read your ship's log, Captain James T. Kirk. At least I know what I am! I'm a soldier!"
"You won the war, Edison. You gave us peace!"
"Peace… is not what I was born into."
- - Kirk and Krall (Star Trek Beyond)
"You… can't stop it. You will die."
"Better to die saving lives, than to live with taking them. That's what I was born into."
- - Krall and Kirk (Star Trek Beyond)
Krall was portrayed by Idris Elba.
Precisely what the writers of Star Trek Beyond aimed to achieve by creating this character was one of the first discussions they had. Recalled co-writer Doug Jung, "We were trying to find something that felt it was worthy of the fifty-year anniversary [of Star Trek] – so a character who could challenge the Roddenberry universe [was called for]."  The writing team additionally "wanted to have a villain who felt bad and intimidating," stated Jung. (Star Trek Magazine Movie Special 2016, p. 27) Another goal the writers had was differentiating Krall from the two main antagonists in the previous two films, Nero and Khan Noonien Singh, both of whom were driven by revenge. Regarding Krall, Simon Pegg explained, "The thing that we didn't want him to be was just out for revenge [....] We wanted his motivation to be more complex, and more mysterious." (Star Trek Magazine issue 184, p. 14) Similarly, Star Trek Beyond Director Justin Lin wanted the character to have a legitimate reason for hating the Federation, which the filmmakers had decided they wanted to examine in the movie. "If we really want to deconstruct what the Federation means, we need to have an antagonist with a valid point of view," Lin reasoned. "It can't just be someone twirling their moustache. For the audience, when they hear [Krall's reasons] they might not agree with them, but they have to accept it's a valid point of view." (Empire, issue 326, p. 71) Lin also stated, "Once I'd posed Simon and Doug that challenge, and we were trying to come up with ideas to deconstruct it, I thought they did a great job of writing and creating Krall." (Star Trek Magazine Movie Special 2016, p. 10) Having Krall be thematically tied to Kirk "made him more interesting," as Jung phrased it. (Star Trek Magazine Movie Special 2016, p. 27) He elaborated that the character originated by paralleling Kirk's personal search for purpose in his own life with an alternate viewpoint of the Federation's purpose. 
Making Krall a former MACO seemed to work well for the character. "We knew what we wanted him to go through. We knew we wanted him to have this sort of idealistic, philosophical difference with Starfleet," said Doug Jung, "but we didn't quite have why – so we were like, 'Maybe he came from this world that was taken over by the Federation,' but then we were sort of like, 'Well, why don't we wrap it back around in the mythology?' and we got to, 'Why don’t we make him a former member of MACO?' [....] For him to be in that sort of precipice of [historical, political] change and to be a guy who is being asked to make a big change, and is unable to do it, that sort of just fit in thematically with everything we were sort of saying. So it was a gift of fifty years of Trek lore rising to the surface when we need it." 
A challenge in writing the character was deciding how and when to reveal that Krall was sustaining himself with DNA harvested from his victims. The writers found that idea very easy to discuss, though quite difficult to establish in the film, so they had many different iterations of how the revelation was depicted. "There were ways we could have done it to demonstrate that he has this technology," observed Doug Jung, "but again, if you get too into it you start to cast light on some of the things that might not be quite as believable – or, you just tip your hat too much that he's not who he is [....] Ultimately we just sort of decided that we needed it to be part of the whole reveal package. It's a complex idea, if you really think about what he had to do and how he had to get there." 
Another tough consideration regarding the writing of Krall was, in Doug Jung's words, "How do we portray this guy without giving away too much, to kind of make him interesting and try to make him seem like he's not just another dude with a beef." As such, there was some question as to how Krall's true history would be revealed. "Because we were preserving that surprise, there was no other way to do it than to basically have him talk about it," Jung continued. "And to have him talk about it in the past was much better than to have him talk about it in the future. There was one version where he was talking about [it] in the future, and he explained it all, and it leaves [the audience] wondering, 'Why are you explaining this to us? No one cares. We just want you dead.'" 
In backstory that was conceived for the movie but omitted from it, Krall's takeover of the alien society and technology on Altamid would have been portrayed as having been possible because the aliens were essentially mindless, weapon-less drones. "He took this energy source and perverted it in a particular way, and took over what was essentially a mining colony out there," explained Doug Jung. "It was one of those things where we felt that he didn’t have an invading force, but he was taking his skills as an ex-soldier and applying them in a way that he probably never thought he would have to do." 
Krall's make-up originally included a phase which looked particularly Human-looking. Because it was deemed too transparently Human, however, that phase of the make-up was deliberately discarded. 
The costume designed for Krall was intended to seem unique and merge with the alien's body. "Justin wanted you to look at Krall and not be sure whether its him or an armor, where the man within starts and stops," reflected Costume Designer Sanja Hays, "and he wanted you to not be sure how he changed, and what really happened with him. Justin wanted us to create something you hadn't seen in previous Star Trek movies, or previous sci-fi movies." (Star Trek Magazine Movie Special 2016, p. 41)
A concept sketch of Krall can be found at TrekCore.
As Justin Lin saw it, there was only one real contender for the role of Krall. "Idris was my top choice by far," the director said. "Because a lot of times antagonists don't really have a lot of screen time. So you need someone who can command a presence and be able to fully commit and carry that through very surgically. We had a great first conversation." (SFX, issue 276, p. 50) During that initial discussion, Elba and Lin conversed for about an hour. (Star Trek Magazine Movie Special 2016, p. 10) "But at the very end he paused," continued Lin. "I was like, 'Aw, shit.' He goes, 'It's gonna be four hours of make-up every morning, right?' I said, 'Yup…' It was four hours every morning, and he [did it]." (SFX, issue 276, p. 50) Elba collaborated with the writing staff on the minor facets of the character, the actor pitching small character details, which the writers managed to incorporate into the portrayal of the character. (Star Trek Magazine issue 184, p. 14) Kirk actor Chris Pine remarked that, in his performance as Krall, Elba "was very alive and present, and changing stuff from one take to the next." (Star Trek Magazine Movie Special 2016, p. 21)
Justin Lin was delighted with Idris Elba's performance as Krall, enthusing, "He was awesome. He's delivering a 100% every time." (SFX, issue 276, p. 50) Noted Simon Pegg, "Our villain is a very interesting force." Pegg commented, too, that working with Elba on the minor details of the character was "a really productive process" that Elba "was really good at." (Star Trek Magazine issue 184, p. 14) Doug Jung said about Krall, "He's got the classic Star Trek villain qualities to him." (Star Trek Magazine Movie Special 2016, p. 27) Jung was pleased that the character's actual backstory was effective. "One thing that surprised me," he admitted, "is that no one was saying 'Oh, there's Idris Elba in a lot of makeup; there's an NX ship that seems like it shouldn’t be there. He’s going to end up being the [captain.]"  In Chris Pine's opinion, Elba "came up with this really rather extraordinary character." (SFX, issue 276, p. 55) Uhura actress Zoë Saldana offered, "I really liked this character, Krall. I like what he's about. He also represents a lot of individuals in the past 10 to 15 years [....] [He's] a very lethal Big Bad – and, the make-up is astounding!" (Star Trek Magazine Movie Special 2016, p. 46) Sulu actor John Cho remarked, "The composite [character design] I saw was incredibly frightening." Cho also called Krall "an interesting bad guy." (Star Trek Magazine Movie Special 2016, p. 67) McCoy actor Karl Urban agreed, "He's a worthy adversary because, like all good villains, he forces the protagonists to question themselves and to question their direction." (Star Trek Magazine Movie Special 2016, p. 62)