The sefer גבעת שאול here explains that when there are two things mixed together, for example apples and oranges, and one wishes to separate the apples from the oranges, there are three ways to do it. The first is by taking all the apples, leaving the oranges where they are. The second is by taking the oranges, leaving the apples where they are. And the third way is by moving both the apples and the oranges to different places, and this is the most complete and decisive separation.
Here too, these five things that Hashem gave names to during the six days of creation were things which were originally mixed together under a certain name, and after they were completely and decisively separated Hashem gave them new names to show that their separation was to be forever, and that they would never go back to being a mixture.
The first of these things were light and darkness, which operated in a mixture without any order, until Hashem separated them and gave each one its own spacial and temporal rules, and He then called the light 'day', and the darkness 'night'. Similarly, the whole world in the beginning was a mixture of water with water, but then Hashem separated the upper waters from the lower waters and called the firmament and the upper waters 'heaven'. But the lower waters still operated in a mixture with the earth, so Hashem made a second separation, gathering the lower waters into one place so that the dry land appeared, and He called the dry land 'earth' and the gathering of waters He called 'seas'.
There is also a sixth thing that Hashem gave a name to during the creation, and that is the name He gave to the male and female together, as it says in Bereishis 5,1 "Male and female He created them and blessed them and called their name 'Adam', on the day when they were created". Here however He made a change from the previous namings, because before they were separated they were also called 'Adam'. But in order that their separation would not be a total disassociation but rather they should be "one flesh", working together in the completion of their task in this world, He did not give them a new name but again called them 'Adam', continuing with the first name.