Constellation Energy, a major US nuclear power plant operator, has agreed to buy another electricity producer, Calpine, for nearly $27 billion, the two firms announced Friday.