Refrigeration is necessary for hard boiled eggs if they eggs are not to be consumed within a few hours. Hard-cooked eggs in the shell can be refrigerated up to one week.
It doesn’t matter if they are peeled or not. If is preferable not to peel them until you are ready to eat or use in your recipe. Peeled hard boiled eggs can be stored in the refrigerator in a bowl of cold water to cover for about 1 week (change the water daily) - or in a sealed container without water (cover the eggs with damp paper towels) for the same length of time.
If I want to store a lot of hard-cooked eggs, I pickle them so they will last longer in the refrigerator. Pickled eggs, contrary to initial thoughts, can be used in regular recipes called for hard-cooked eggs and will add to the flavor (and color).
I have made deviled eggs two days in advance of a big party. I know the left overs have never gone bad around here, so add about three more days. Now I do have a Kitchen Aid fridge and with those insulated doors, very little food spoils on me.