Depends on a few things.
For a sunset at this time of year and if I was going somewhere easy to get to (good path and low level) then I'd probably walk in for the sunset and walk back in the dark.
If the location was a mountain top then I'd be less likely to risk taking a tumble in the dark, so would be inclined walk in early and camp, but that would mean a lot of hours in the tent.
For a winter sunrise I'd probably just get up a bit earlier than normal and walk it. The drawback to this is that early morning winter roads could be a bit dodgy.
During the summer and particularly in the north the nights are so short that it could be worth (given decent weather) walking in late with just enough gear to keep you warm, getting the sunset and then waiting a few hours for the sunrise (assuming the location is good for both).
Dave