Survey of Roman law
A now deleted (near) duplicate of this question asked if a claim that the Roman law forbid the crucifixion of thieves, so I'll start with that question, which is highly relevant to our exegesis of the Gospel accounts.
There are a lot of claims on the Internet and in popular-level books about Roman crucifixion. Some common claims included that women couldn't be crucified, that crucifixion was reserved for the most severe crimes (such as treason and murder), and that Roman citizens were exempt. What all these claims seem to have in common is that they are never backed by references, let alone primary sources. All three are false. I suspect the claims are based on a combination of over-generalization (the majority of crucifixions were on non-citizen men, for example) and it "making sense" to the modern reader's sense of justice.
The non-citizen-only claim is not relevant for this question (few people in Jerusalem would have been Roman citizens in 30 AD). The male-only claim is obviously not relevant (but is answered in this History.SE question). I will address the major-crime-only claim here, looking primarily at cases of theft.
The real truth about Roman crucifixion is that it was commonly used as punishment for all types of crimes committed by slaves and the lower classes. According to Crucifixion in the Mediterranean World, it was the primary punishment used on slaves.1 Jeffrey Ross agrees, writing:2
In the writings of most Roman authors, crucifixion appears to be reported as the normal punishment for disobedient slaves.
Crucifixion was regularly used on liberti (former slaves) and peregrini (non-citizens), and not just for major crimes. Crucifixion was occasionally used on citizens as well.1
In Against Verres, Cicero describes a farm owner who, upon discovering the fraud of the farm manager, should inflict summum supplicium (extreme punishment), a phrase Cicero clearly ties to crucifixion in the same work. A farm manager would generally be a position held by a freedman or slave. Similarly, in Digesta seu Pandectae (in English usually called simply Digest), the compendium of Roman legal code, Pomponius describes a night prefect being properly punished with summum supplicium for theft. Elsewhere in Digest, the penalty for grave robbing is given as summum supplicium for the humilioris, a term used for all lower class persons (e.g. anyone who didn't own property). Although there is no formal definition of the term in Roman legal code, Garnsey investigated its usage and concluded it refers to "crucifixion, burning alive, and perhaps condemnation to the beasts."1
In the play Bacchides, the main character, a slave who has stolen some gold, imagines himself in the future, carrying not the gold, but rather a cross.2 A fragment of a legal code known as lex Puteolana says that a salve owner has the right to have the state crucify a slave for any crime whatsoever, as long as the owner pays the cost of the execution.1
In Digest, the jurist Callistratus describes certain thieves being subject to crucifixion:1
The practice which has been approved by most authorities has been to fasten (or nail) notorious brigands to the cross in the place they used to haunt
There is no indication of the punishment applying only to some social groups. In the Lex Fabia, a legal code concerning run away slaves, crucifixion is listed as a possible penalty for aiding the slave (and thus "stealing" the master's property), among the humiliores.3
Severus Alexander is said to have had a disgraced public official (so an upper class citizen) crucified after being convicted of theft:1
the kings were asked what penalty thieves suffered at their hands, and they replied "the cross," and at this reply the man was crucified.
Meaning of the Gospel accounts
We have now established that thieves could be and were crucified by the Romans. Thus, we can turn to the Gospel narratives without risk of biasing our translation by what we know about the Romans.
Matthew 27:38 reads:
Τότε σταυροῦνται σὺν αὐτῷ δύο λῃσταί, εἷς ἐκ δεξιῶν καὶ εἷς ἐξ εὐωνύμων.
Then two robbers (λῃσταί) were crucified with him, one on the right and one on the left.
Mark 15:27 writes:
Καὶ σὺν αὐτῷ σταυροῦσιν δύο λῃστάς, ἕνα ἐκ δεξιῶν καὶ ἕνα ἐξ εὐωνύμων αὐτοῦ. (NA27)
And with him they crucified two robbers (λῃστάς), one on his right and one on his left. (ESV)
Luke 23:32 has:
Ἤγοντο δὲ καὶ ἕτεροι κακοῦργοι δύο σὺν αὐτῷ ἀναιρεθῆναι.
Two others, who were criminals (κακοῦργοι), were led away to be put to death with him.
and John 19:18 reads:
ὅπου αὐτὸν ἐσταύρωσαν, καὶ μετ' αὐτοῦ ἄλλους δύο ἐντεῦθεν καὶ ἐντεῦθεν, μέσον δὲ τὸν Ἰησοῦν.
There they crucified him, and with him two others, one on either side, and Jesus between them.
Luke's just uses the nondescript "criminals" and John is even less specific saying simply "others". That leaves Matthew and Mark who both use a form of λῃστής.
According to A Greek-English Lexicon of the New Testament (BDAG), λῃστής has two meanings. The first is "robber, highwayman, bandit". A good example of this usage is Luke 10:30:
Jesus replied, “A man was going down from Jerusalem to Jericho, and he fell among robbers (λῃσταῖς), who stripped him and beat him and departed, leaving him half dead.
Here it is clear that more than shoplifting is in mind - this is about violently taking property. Further, John 10:1 (see also 10:8) shows that the cannot merely be a close synonym for thief:
"Truly, truly, I say to you, he who does not enter the sheepfold by the door but climbs in by another way, that man is a thief (κλέπτης) and a robber (λῃστής)."
If there was no distinction between κλέπτης (the ordinary word for thief) and λῃστής, Jesus' words would be silly, but they are not. He is saying the man is both taking "property" (literally sheep, but in the context of the parable, souls) and committing an act of violence (in context, against God).
The second usage of λῃστής is "revolutionary, insurrectionist, guerrilla." This is most likely the usage intended in John 18:40:
They cried out again, “Not this man, but Barabbas!” Now Barabbas was a robber (λῃστής).
While the ESV has chosen to translate it as "robber," the context clearly suggests a very serious crime is in mind. If Barabbas was a robber, he must have been a violent one - and John does not need to use an adjective to express that. Mark 15:7 backs up that John means insurrectionist by λῃστής, as he describes Barabbas as a rebel who committed murder in an insurrection.
This is probably also the intended meaning in Matthew 26:55 and parallel accounts - one does not need "swords and clubs" to capture a petty thief, nor would one expect a mob to seize a bandit. One would, however, expect a crowd to attack an unpopular revolutionary or insurrectionist.
For the latter definition, BDAG also cites numerous passages in Josephus that suggest insurrectionists/guerrilla fighters.
Given the fact that Barabbas was in custody for his part in an insurrection, it seems likely that the two λῃστής crucified with Jesus were also insurrectionists. If not, they were at least violent robbers - the meaning of λῃστής does not allow for ordinary thieves.
Conclusion
People were crucified for all kinds of crimes under Roman law. Social status was a far bigger factor in whether one was crucified or not than the nature of the crime. There are plenty of Roman documents that suggest thieves could be and often were crucified. There is thus no legal difficulty in saying the criminals executed with Jesus were thieves.
The nature of the word λῃστής, however, suggests that the men crucified with Jesus were violent. They were either ruthless bandits/highway robbers or insurrectionists. The context of Barabbas' release and the description of him using the same word suggests that insurrectionists is the most likely meaning. This conclusion also fits with the fact that Jesus was said to be a revolutionary by those who sought to justify the need for execution with the Romans.
The best conclusion, then, is that Jesus was crucified alongside two rebels (so NIV)/revolutionaries (so NLT). Or, if one wishes to keep the theft connotation, "bandits" (ISV, NRSV) is a pretty decent translation. The more common translations of "robbers" or "thieves", in my opinion, do not properly convey the violent nature of the crime committed by the criminals.
References
1 Crucifixion in the Mediterranean World (2014) by John Granger Cook
2 Religion and Violence: An Encyclopedia of Faith and Conflict from Antiquity (2015) by Jeffrey Ian Ross
3 New Documents Illustrating Early Christianity (1997) by By S. R. Llewelyn