Sizing a solar panel and battery for a simple solar application
Using a 120 VAC inverter and a light bulb to keep your pipes from freezing is just a dumb idea.

If you need 40W worth of heat in an enclosed space, just select a bunch of power resistors that add up to that amount, screw them to a heatsink and run them directly from your 12 V battery. For example, a 15-ohm resistor will dissipate about 10W @ 12V, use four of them.

You can also get CFL lamps that run directly from 12V.

Let's say you need a run time of 48 hours, and you have a minimum of 6 hours to recharge.

Your load is drawing a daily average of 3.33 (heater) + 5/24 &times; 1 (lights) = about 3.5 A.
Multiply by 48 hours to get the battery capacity: 170 Ah

Batteries aren't perfectly efficient, so it'll take about 170 / 0.8 = 212.5 Ah to recharge it.

If you want to drive the load and recharge the battery in 6 hours, you need a panel capacity of about 40 A @ 12 V, or 480 W.