Generally when quail attack each other, as with other fowl, it's because they're stressed. Separating the males from each other is a really good idea (not necessary to separate them from the females unless they continue to attack after being separated from each other). Here are other factors to look at:
How old are the quail? If you have juvenile birds, even if they look like adults, the adults will brutalize them. So if you've got 5-week-olds in with 8-month-olds, then you're going to have attacks. I learned this the hard way.
How much space do they have? One square foot per bird is considered minimum, but for truly unstressed birds, look at four or five feet per bird. I have three birds in a 100-sq-ft aviary and there are never problems. Obviously, this is unrealistic for most people, but for PET birds it's viable. I plan to add about six more in the spring, which will still be over 10 sq ft per bird.
What conditions are they in? The standard wire-bottomed, low cage is stressful for quail, especially if they are surrounded by wire. They are ground birds who enjoy cover, and like to hide, so a wire cage is really really hard on them. A sandbox or two goes a long way to helping with this problem. It gives them a place to retreat that doesn't feel like it's up high (because of the solid bottom), and high sides that feels like cover. Also, they enjoy digging in the sand, and it's comfortable to them. They'll also lay their eggs in there which keeps the eggs cleaner & easier to collect.
The won't generally go into an enclosed box, so hide boxes are wasted on them. They like to see but not BE seen, so give them opportunities to get into a hiding place that is open on at least two sides to see out. This is true for the sandboxes too--give them two high sides (to prevent excessive waste of sand) and two low sides--for ease getting in and out, and for visibility.
Finally, for extra happy quail, give them things to do. They like to dig in sandboxes, dig in dirt, and peck through weeds. I used to grab several handfuls of weeds and toss in their cage when I had quail on wire (mine are on dirt at ground level now), and they loved it. They'd come to the doors waiting for me every day.
Toss bird seed in the sandboxes to peck for. They'll adore it!
Primarily, though, look at the amount of space and whether they feel secure (i.e., have opportunities to not feel like they're in a tree and exposed to all the world), and I think that will help a lot with the aggression.
Of course, as has already been said, sometimes males just can't get along with each other and/or the girls, and you may have to cull. But give them an opportunity via environment and management before you jump to those measures.
Hope that helps!