Shelter Scotland said a "chronic" shortage of affordable social housing was the root cause of the problem.
It called on the Scottish government to build at least 10,000 new social homes each year and begin to reduce long council house waiting lists.
The Scottish government said it was making "substantial progress" to tackle homelessness.
Shelter Scotland has launched its Christmas 2014 appeal.
Last month it released analysis of official figures which, it claimed, showed the number of children living in temporary accommodation across Britain was at a three-year high.
To launch its festive appeal, campaigners, MSPs and primary school pupils joined together to decorate a tree with little red houses to highlight the issue.
Shelter Scotland director, Graeme Brown said: "It's completely unacceptable that in the 21st century 4,228 children in Scotland will spend this Christmas homeless.
"That's enough to fill the Scottish parliament chamber 32 times over and equivalent to more than two homeless children for every primary school in Scotland."
Mr Brown added: "The temporary accommodation they are forced to live in is often poor quality housing where they can spend months or even years waiting for a home of their own.
"We need to see 10,000 new social homes built each year to tackle Scotland's housing crisis. That way, we can work towards a future where no child has to wake up on Christmas morning, or any other morning, in such awful circumstances."
The Scottish government said it was investing more than Â£1.7bn to deliver its target of 30,000 affordable homes during the lifetime of this parliament, it was working with local authorities to build record numbers of council houses, and had abolished the Right to Buy.
Housing Minister Margaret Burgess said: "Across Scotland we are making substantial progress tackling homelessness, with fewer households with children living in temporary accommodation in recent years.
"The vast majority of those children live in good quality, well managed social housing and will be waiting to move into more settled accommodation.
"If Shelter is aware of any substandard temporary accommodation, I would ask them to present evidence to the Scottish Housing Regulator."
More than 4,000 children will be homeless in Scotland over Christmas, according to a housing charity.