Dozens of municipalities statewide have received grants to support green initiatives, including six in western Massachusetts.