in Fallout 4 the settlements are completely optional: if you want, you can do what most players do and use the Red Rocket truck stop to store your power armor and various other loot things.
The bad news is that you will probably want to have a few settlements set up, and they do require just a bit of micromanaging. You will notice pretty quickly that Fallout 4 has a sort of void to it. It is hella fun wandering the commonwealth wasteland, don’t get me wrong, but after awhile you will start to question just how it is all these raiders, mirelurks, and super mutants are getting their resources in the first place! For most of the game, you pretty much have two towns you’ll be going to, Good neighbor and Diamond City. You will get bored of these places very, very fast (at least I did!) The people in them are lively and they are filled with going-ons you can participate in, but in a game about exploration and discovery, you can really only discover these places once, you know? The locations are all so interesting, but by the fourth or fifth time there you will blow past all the visual stimuli and make your way on through for whatever reason you arrived in the first place.
This problem here is the number one reason I began investing in settlements. You get to be the grand architect: plot out a fresh patch of land, wall it up the best you can (it never works the way you want it to) and seal up the holes with miscellaneous doodads or enough firepower to make any mean ol’ mother-lover who thinks they can take advantage of your settlers think twice about how much they may or may not want to be filled with bullet holes, laser burns, and explosion-forced shrapnel. More importantly, you can invest some perks (you will have the spare perks to do so as well) into making your settlements better; I highly recommend it! Trade routes will earn you resources to improve your settlements, armor, and weapons. It makes the entire process seem less like a grind and more like an investment. Higher risks lead to some nice rewards, including merchants who make the entire game world feel more alive! Your settlements stop being about producing and surviving and more about trading and specialization! Protecting settlements is less about “ah fuck it, I’ll reclaim it later” and more about “those sons-of-bitches are attacking the camp I sent all my glass to! Fuck those fuckers right in their faces!” It makes the game feel more alive, and it certainly makes me feel more immersed when I have assets I want to protect.
TL;DR: Settlements are not necessary, but I would recommend them anyway.