There are several reasons Trinity must be an all-boys' school for the plot of The Chocolate War to work. A few of them are historical -- at the time of Cormier's writing, there were co-ed Catholic high schools, to be sure, but the tendency for them to be single sex, especially those devoted to college preparatory like Trinity, was strong. Some of the oldest and most established schools were single-sex, and they still are. Part of Trinity's prestige was its college preparatory atmosphere and its academic rigor; these were buttressed, at that time, by its being single-sex.
Secondly, the atmosphere of violence and oppression is increased by the single-sex atmosphere. Not only are the boys at Trinity persecuted by the activities of the Vigils, the culture of violence and coercion would be much easier to enforce in an all-male environment. Also, the collusion between Brother Leon and Archie from the Vigils would probably have been impossible to sustain if the Vigils were persecuting female students. It is possible, too, that parents would have been more involved with the bullying atmosphere if the students at Trinity would have been their daughters, and not just their sons. The boys themselves, too, might have been much less under the thumb of the Vigils if there had been girls in the school. High school boys are interested in impressing girls, and there may have been backlash from female students if things were too violent. If the Vigils had become unpopular with a majority of the girls, the status of the members (such a Carter, the star football player) might have been hurt. It would have become a marginalized group; it would have been made up of lower-status boys, rather than the leaders of the school. It might never have existed in a co-ed environmnent.
Finally, the final fight between Emile and Jerry probably wouldn't have taken place in a school with female students. Afraid of he consequences, or, possibly, just more horrified by the violence, female students would have alerted their parents or the school's teachers to the planned fight between the two boys. It seems difficult to believe that a plot like The Chocolate War would have happened in a school with both boys and girls.