A Boston judge has ruled that homeowners may sue a bank under Massachusetts’ consumer protection law, which offers possible triple damages, for violating the federal Treasury Department’s Home Affordable Modification Program standards.