Massachusetts lawmakers on Tuesday passed a compromise clean energy bill that is less ambitious than the bill the state Senate passed in June.