What kind of trip do you plan? I wouldn't dream of going to Scandinavia in the winter, but if you're into cross-country skiing and value holiday lights more than you hate cold weather, perhaps it would be right for you.
There's no way to predict the precise weather you will encounter at any time of year, but one thing you can take to the bank is that the days will be massively shorter in December than in August. The Wikipedia entries for most cities have a handy Climate chart. It usually includes monthly average hours of sunshine. Here's what I found for Stockholm:
December: 33 hours (for the month!)
January: 44 hours
August: 235 hours
If you're interested in more details about what sort of weather you could expect at either time, check out timeanddate.com, which provides actual, historical, day-by-day weather statistics going back about ten years. Here's Stockholm for December 2021:
https://www.timeanddate.com/weather/sweden/stockholm/historic?month=12&year=2021
As someone who loves museums but also spends a great deal of time walking around outdoors, enjoying the architecture, I would have no difficulty with this decision, but YMMV.
It's possible lodging rates would be substantially lower in the major cities in the winter, though I don't know that for a fact. You could check some rates on booking.com and probably figure that out pretty easily. Norway is by far the highest-cost country, so take a look at Oslo and Bergen as well as Stockholm and Copenhagen.