A young gunman killed 20 small children and six teachers in the Friday shooting, after walking into a school in an idyllic Connecticut town wielding at least two sophisticated firearms.
The queen, who never gives interviews and normally restricts her public comment to events in Commonwealth nations, added: "Prince Philip joins me in extending our heartfelt sympathy to you and the American people at this difficult time.
"The thoughts and prayers of everyone in the United Kingdom and throughout the Commonwealth are with the families and friends of those killed and with all those who have been affected by today's events."
Her words echoed those of Prime Minister David Cameron, who earlier said he was "shocked and deeply saddened to hear about today's horrific shooting".
"My thoughts are with the injured and those who have lost loved ones. It is heartbreaking to think of those who have had their children robbed from them at such a young age, when they had so much life ahead of them," Cameron said.
The toll in Friday's attack was the second deadliest of the recurrent school shootings in the United States.