Always, always, always bury pipes below the frost line. In northern Wisconsin that's up to 80" deep:
Back To Map Wisconsin Extreme Frost Line Penetration (in inches) State Average Frost Depth: 65″ Source: U.S. Department of Commerce
www.hammerpedia.com
Your local building codes may provide guidance or requirements. Whoever drills your well will do this automatically - you'll have to give them special instructions if you want the pipe buried above the frost line, and they probably won't warranty their work if you do.
If you plan on digging/drilling the well yourself, and want to do it cheaply without a lot of hand digging, then I can understand the desire to heat the pipe, but I'll tell you now - it will eventually freeze, and you'll end up digging it out and replacing some or all of it at some point in the future. The heating cables have a limited lifetime, and everything breaks down over time, not to mention power problems. For instance, in the dead of winter you're going to get maybe 3-4 hours of quality daylight. If you have a long pipe that's poorly insulated, it may take hundreds of watts to keep it from freezing. That means your solar array and battery has to work correctly, in sub freezing temperatures, with a capacity larger than you might think for those cloudy, cold, December days when you get little sunlight.
It really is best to bury it.
All that said, if you're determined to go above the frost line a regular heat cable with at least 1" of insulation will keep your pipe from freezing:
Read the FAQ and instructions carefully - Don't use it on hoses or PVC, it's only appropriate for schedule 40 plastic pipe or metal pipe. Don't overlap it.
If your needs are more complex, use a heat trace cable calculator, such as this one:
Industrial process heating systems and components. We pride ourselves on superior application engineering assistance - just a phone call away. Wide variety of products available online.
oemheaters.com
For instance, entering 0.75" pipe, 10 feet, minimum ambient temperature of -37F (wisconsin minimum record), holding temperature of 40F, and 1" of fiberglass insulation you'll find that a 4 watt per foot heating cable is more than sufficient for the task. The above frost-king cables are 7W per foot, and they are temperature regulated when properly installed, so they should meet your needs, and can be found at Home Depot and other hardware stores.
For a 10' pipe, that'll be up to 70W continuous power draw, so you'll consume nearly 2kWH each day on the coldest days. You'd want it to last for a few days in a row of bleak weather and snow covering (and remember, you will need to clear the panels every day if the snow sticks to them!) so you'd want 8-10kWH of battery. Then you'll want 4kW of panel or more so when the sun does shine for 4 solid hours you can fill your bank, and when it doesn't you can, on average, keep up with the 2kWH/day you need. This may seem oversized, but if, when it fails, you lose water and have to fix a burst pipe in the middle of winter, outdoors, you'll really be cursing yourself for not oversizing the power system.
So you're looking at as much as $6,000 for your solar power system
just for the 10' of pipe, which is easily 10x the cost of burying it.
Bury it below the frost line. Do it right, or do it repeatedly until you do it right.