Samurai took banners into battle much the same way European knights did. It announced who they served, let their generals determine who stood where, and hopefully filled the enemy with the kind of pants-wetting dread that spells victory on the battlefield. (It also helped Japanese armies retain a sense of uniformity, since samurai armor was very individualistic and might have been in individual families for generations.)
The samurai here have lost the symbolic connection that a banner represents. They no longer have any lords and don't fight at the behest of a noble leader. They're doing it for money—heck, not even money, just three lousy bowls of rice a day—and as such, they don't have a flag.
So they make one.
The very act itself is a big break from Japanese tradition, which frowned on spontaneous acts of creativity and certainly didn't want you just making up war banners on the spot. But times are tough in Seven Samurai, and these guys want to tap into that esprit de corps their caste used to enjoy. "By protecting others, you save yourself," Kambei says. Since the seven samurai largely haven't fought together before, and since they're protecting farmers who, it has been noted, were happy to kill wandering samurai, the banner gives them all a unity of purpose if they're going to survive against long odds.
The pattern on the banner holds meaning too. Heihachi, the woodcutting samurai, makes it for them, and it reflects some of his whimsy and quiet mischief. The six circles on the top represent the six "proper" samurai in their company. The symbol at the bottom means "tanbo" or rice paddy. It's supposed to represent the farmers who the samurai are defending. (It's interesting that the samurai each get their own symbol, but the farmers are still lumped into one big group; some class differences are still in place). Between them stands a triangle representing Kikuchiyo: the outsider of the bunch who stands balanced between the samurai and the peasants they're protecting.
It's a pretty good look for them, as banners go. More importantly, it helps remind everyone in the village that they're all in this together, and that they need to work together in order to survive. That means a whole lot in a world like this, where life is cheap and death waits around the bend. If it gives the village a little hope, then it's more than welcome: it's darn near necessary.