The Massachusetts Senate on Thursday night passed a clean energy bill that was welcomed by the industry.