I prefer to leave it unlocked. That seems to give the most neutral and predictable handling, at least when I tested it in a snowy parking lot.
If you lock it, it turns VSC off, which means it won't try to help you keep going in the direction you intend to go (the direction the steering wheel is turned). But it also might reduce the throttle if it detects wheels spinning, so if you get stuck VSC can get in the way. I've already had VSC save me once on the way down a snowy mountain pass. I was going too fast, and it kicked in to keep me from sliding into the concrete barrier at the side of the road.
With it locked, I also got a lot more understeer most of the time. I would try to turn, but it would keep going in a straight line. Sometimes I would get oversteer and basically spin out. If you are trying to stay on the road, you don't want either of those things.
Last weekend I was driving off road on a snowy road. There was maybe a foot of snow, but nice deep tire tracks to drive in. With the center unlocked it was easier to stay in the tracks, and I didn't get stuck. With the center locked, I was sliding around more, and it was more difficult to stay on the line I wanted. At one point I slid out of the tracks, slowed down and lost momentum, and came to a stop. I was stuck in the sense that I couldn't go forward, even with the center locked. I didn't use 4-low because I was already spinning wheels, and the traction control couldn't get me going. Luckily I was able to back out, but I had a couple more close calls after that in some deep spots. This was snow that has been melting for two weeks, so it was soft but easily compacted into something hard. With more aggressive tires, chains, or a rear locker, I might have been able to plow through the snow without backing up.
In general 4wd won't help you much on snow and ice, except for getting going. It doesn't really help you turn or stop, so it's important to have tires with good tread, and take it easy when the roads are slippery.