In a video message on the first day of the conference in Scotland, the queen urged leaders to rise above "the politics of the moment" and said the legacy of a successful summit would help "our children's children".
The 95-year-old, the world's oldest and longest-reigning monarch, was due to attend the event in person in Glasgow but pulled out after doctors advised her to rest.
"It is the hope of many that the legacy of this summit - written in history books yet to be printed - will describe you as the leaders who did not pass up the opportunity; and that you answered the call of those future generations," the queen said.
"The benefits of such actions will not be there to enjoy for all of us here today: we, none of us will live forever. But we are doing this not for ourselves but for our children and our children's children."
She paid tribute to her late husband, Prince Philip, who died earlier this year aged 99. She remembered how he had warned an academic gathering in 1969 about the need to tackle the threats from pollution.
"If the world pollution situation is not critical at the moment, it is as certain as anything can be that the situation will become increasingly intolerable within a very short time," she quoted him as saying.
The queen said she "could not be more proud" that his work had been continued by her two closest heirs, her son Prince Charles and grandson Prince William, who are both attending the summit.
On Monday, the queen was pictured driving by herself around her Windsor Castle estate after she last month cancelled some engagements and spent a night in hospital for an unspecified ailment, her first such overnight stay for years.