A 21-year-old man was charged with three counts of murder, two counts of attempted murder and an aggravated weapons offence.
Prosecutor Andreas Nyberg told AFP the suspect "acted as what could be called a hitman," adding that it was unclear if the victims were the intended targets or who had ordered the hit.
The shooting took place in the university city of Uppsala on the eve of the town's Valborg spring festival, which draws more than 100,000 people for street celebration.
According to Nyberg, the investigation had not been able to show why the three victims had been killed.
"The sequence of events itself may provide some clues, but the investigation has not been able to show anything more than that."
Nyberg said the suspect had first opened fire against two men outside the hair salon.
Neither died and one ran into the salon and hid in the toilet.
The suspect then shot the three victims, who were inside the salon. Nyberg said it was possible that they were not the intended targets.
The youngest victim, who was 15, did not appear to have links to any criminal activities, and was likely just a customer, Nyberg said.
The prosecutor said the accused had only given limited responses to questions, other than to deny the charges.
Nyberg said investigators were still trying to establish who had ordered the hit.
According to the prosecution, an envelope containing 100,000 kronor ($11,000) in cash and a letter listing different assignments had been found when the suspect was arrested.
Another three men, aged 18 to 24, were charged with aiding and abetting murder.
A fourth man, aged 25, was charged with an aggravated weapons offence and harbouring a criminal.
The main suspect was also charged with two separate counts of attempted murder for a shooting in the south of Sweden just weeks before the triple murder.
The trial is scheduled to start on February 18.
Sweden has struggled for more than a decade to contain a surge in gangland violence, linked primarily to rivalry between gangs and battles to control the drug market.
Comments