I was curious about the same back in the day when I got my first iPhone. First of all, I eventually figured out that going to settings every time you leave Wi–Fi area is just OCDish and a hassle, and it’s not worth it just because of that. Second, my observation is that it might affect battery life, but does not affect it dramatically. Actually the contrary can (in certain scenarios) – having your Wi–Fi on while out and about, because if the Wi–Fi is on, your phone is searching for networks every now and then, every time you use it, every time you’re using navigation… But again, I only ever switch Wi–Fi off if I absolutely must preserve battery (e.g. I’m in another city and don’t know when I’ll have access to the outlet)