If you want a group that lives outside of the law to have depth, you have to provide a motivation for them to live like that.
Living outside the law isn't easy. In general, laws exist because they provide safety and stability. Being a bandit means that you don't have that safety or stability!
So let's take a look at some viable motivations:
- Your family is starving: If you don't have enough to eat, you don't feel safe or stable even if the land you are living in is otherwise a utopia. You are going to go to desperate measures to find food. If other people have food and you don't, you're going to try to steal food or something that can be used to obtain food. There is a lot risk in doing this, but if it's literally do or die...
- You have been cast out by society: Hundreds of years ago, exile would have been more harsh than a death sentence. You no longer have anyone helping you if you are sick or injured. It would be difficult to get any other village to accept you. Setting up a farm on your own would be very difficult, and because you're an exile it makes it much easier for others to find you and punish you again for whatever caused you to be exiled.
- The rule of law is broken: If the law is being ignored or is twisted in favor of those in power, you don't feel the safety and stability the law is supposed to provide. This is where Robin Hood figures and rebel groups fall. These people generally want to follow good laws, and feel that in order for that to be possible they need to cause massive changes to happen.
- Peer pressure: If your friends are members of a gang, you'll feel social pressure to be affiliated with that gang. You might actually be press-ganged into joining the gang. This could happen with a bandit group, too, whether they are recruiting or outright kidnapping.
There are, of course, other possible motivations. For a group of bandits, etc. to form, the conditions need to be sufficiently bad for a number of people to be in these situations. Having a grudge against society or the powers that be is a good common ground for people to share, making it plausible that they will tolerate each other even if they are naturally violent people.
You should also think about the origins of a particular group - I don't expect bandit groups to have a great long-term survival rate. A group of starving peasants would be likely to want to work together, but if they're starving the chances are that they're less skilled than average. A group of people exiled for being violent might be able to survive thanks to their skills, but the group is likely to fracture due to their violent natures. A mix of violence and starvation could wind up rather stable - the few violent exiles would naturally seek to take charge, and could provide enough leadership to keep the group alive, while the starving peasants help keep the group cohesive enough to not split apart.
So here's a few key points:
- Consider the motivations of the individuals, and give each one a reason to risk abandoning the safety and stability the law provides.
- Have a diverse group. If everyone in the group is a cookie-cutter copy of each other, the group is not likely to be stable enough to be realistic.
- Think about how the group got started, and who joined when. That will shape the group's goals and the rules by which they live.
- Consider how risky it is for them to live as they do, and make sure that their motivations are sufficient for them to be taking such risks.