There are several options, as have been mentioned in other answers, but I'd like to point out a couple of subtleties.
If the alternative name name is a nickname, it's common to see it displayed in quotes between the two names; for example, Lt. Peter "Horse" Caulk was an instructor in the film Top Gun:
However, this is only usual if the name is used often to refer to the same person; while "Peter Caulk" and "Horse" are different names for the same entity, "Barry Allen" and "The Flash" refer to different identities, which just so happen to be the same person underneath. You might write Clark "Superman" Kent, but this would imply that everyone knew that they were the same, which certainly wouldn't be true in-universe.
Other than that, the alternative name should come after the main name; the order is important. "Barry Allen, a.k.a. The Flash" is different to "The Flash, a.k.a. Barry Allen"; the former implies that the focus of your discussion is Barry, while noting that he also goes by "The Flash", where the latter indicates you want to talk about superhero. Contrast the following sentences:
- Barry Allen, a.k.a. The Flash, trained as a forensic scientist.
- The Flash, a.k.a. Barry Allen, trained as a forensic scientist.
One last thing: sometimes you will see quotes being placed around the alternative name, which generally indicates that the writer disapproves of the name, or doesn't accept it themself. For example,
- Peter Parker, also known as Spider Man, saved some people today.
- Peter Parker, also known as "Spider Man", caused untold damage.
In this case, I tend to read it as if they'd written "so-called", as in
- Jayne Cobb, a.k.a. "The Hero of Canton".
- Jayne Cobb, the so-called "Hero of Canton".
It's subtle, and I'm sure some people would disagree, but I'd generally read an alternative name in quotes that way.