When a warm sunny day arrives after a long cold stretch and it seems like you have a roof leak when there isn't a cloud in the sky, it's very unlikely that the roof is the problem.
Frost forms in attics when warm, humid air accumulates and condenses on the underside of your roof sheathing. Depending on the temperature, you will have either frost or water collecting. A little bit of frost forming is not unusual after really low nighttime temperatures, and it isn't a huge problem if it is able to melt and evaporate so that wood can dry.
It becomes a more serious problem when the quantity of frost isn't able to evaporate before more starts to accumulate. The longer this goes on, the greater volume of ice you will have and the greater volume of water you will have leaking down when it finally warms up enough to melt.
If you're further baffled by frost forming on one side and not the others, you're probably looking at the north side. The sun will sometimes warm the south side enough to thaw and evaporate moisture but leave it still coated on the north side.
Reducing relative humidity levels in attics:
There are 3 ways to deal with the problem, and you really should work towards accomplishing all of them. First of all, if the relative humidity of air in your home is too high, work to lower it. Anything over 50% RH is a bit much; 35-40% or so is good for humans and houses alike. The more humid the conditioned space of your home is, the more condensation you will have in the attic.
You can reduce humidity by remembering to use bathroom and kitchen fans when showering and cooking, run a dehumidifier in the basement if needed, and don't hang laundry to dry indoors, unless of course your humidity is down around the 30% RH level then go for it. It will save some dryer energy and a little more humidity will make for a more comfortable living space.
Next, make sure your attic is properly ventilated. Check the attic to make sure that insulation isn't jammed down on the edges and blocking ventilation. While you're at it, make sure you actually have proper ventilation - proper air flow through soffits, make sure there are air baffles on the roof deck so that air can pass through from the soffit, and there should be a good vent at the top. And right at the top, either a ridge vent, or another we like is the 'Maximum' vent (or any similar design); it has really good draw.
Vents on gable ends are not great as they leave the very peak neglected. If gable vents are what you currently have, you're better off sealing them and adding one at the top. And be sure to seal them; if you forget and leave them open, they will limit the effectiveness of better ones you just installed.
Some builders have expressed concerned that ridge vents aren't sufficient because they can be blocked by snow, but snow isn't an air barrier. It will slow the air, but as long as the vent runs the length of the roof there should be enough air flowing through. you can survive (for a time) after being buried in an avalanche if you don't panic and breath slowly. Since roofs aren't prone to panic attacks, by that logic they should be fine for a bit too.
Ceiling air barriers:
Lastly, you should try to deal with any air leakage. Electrical fixtures are notoriously leaky (and this may be better left to electricians) but there are airtight boxes available that you could install instead.
Another solution that isn't very complicated (or much fun for that matter) is dealing with these leaks from above. That would be you on your hands and knees in a dark attic crawling between trusses with a headlamp on, likely letting out the occasional curse word as you bang your head or jam your knee. This step will require removing insulation, but if you're up in the attic at night with lights on below, anywhere that light comes through, air will be coming through as well. Seal those holes any way you can - tape, caulking, spray foam, acoustic sealant, etc.
If you have no air barrier at all, you really do need one. This requires lifting insulation, laying down a polyethylene vapour barrier over the whole surface (it can go up and down over joists) then reinstalling the insulation. Make sure the poly is well-taped at the seams and on the sides as well, it will serve little purpose if it allows air to flow up at the exterior edges. Pay close attention to not tear it while you're dragging it around, and tape it up if you do.
Important to note as well because it will likely come up with contractors, but spray foam will also work to seal air leaks and add insulation. In the unfortunate situation of having no air barrier but a truss system that makes a poly air barrier impossible to install from above, spray foam may be the only solution.
We've generally steered our readers way from spray foam products in the past due in part to health concerns, but mostly to the very high Green House Gas emmissions from spray foam blowing agents.
However 2019 has seen great news about the reduced global warming impact of spray foam, as several manufacturers switch to less harmful blowing agents, read more here.
See our Green Home Building guide pages to learn more about easy energy efficient home upgrades, How to prepare your home for winter, When to replace old windows and when to repair them, How to choose the best windows and everything else you need to know about planning a renovation or new building project.