Act on behalf of the municipality in any appropriate action or proceedings to prevent the unlawful erection, construction, reconstruction, alteration, repair, conversion, demolition, maintenance or use of any building or structure, to restrain, correct or abate such violation, so as to prevent the occupancy or use of any building, structure or land, or to prevent any illegal act, conduct, business or use in or about such premises.