There was a time, the poem's speaker begins, when the world was "perfect" and human beings lived in peace and harmony.
The line's grammatical structure is a subtle example of chiasmus: the line begins and ends with the word "world," which sandwiches the similar concepts of perfection and happiness:
Once the world was perfect, and we were happy in that world.
The structure of the line emphasizes the relationship between humanity and the world, implying that the two are mutually dependent: the world's perfection and human happiness go hand-in-hand. Humanity’s happiness, the poem will go on to imply, is a direct result of their ability to take care of the world and each other.
Although the world described in the first line sounds idyllic, the use of the word "once" sets the poem firmly in the past and acts as a sort of warning. Through the addition of this word, it becomes clear that the utopia described in the first line no longer exists. Indeed, in the second line, the speaker declares that humanity soon enough took the world "for granted," failing to appreciate the gift they'd been given.
Note, too, how the speaker uses the plural first person, "we," to refer to humanity here and throughout the poem. This implicates the reader in the poem's action, inviting them to reflect upon how they, too, have perhaps taken the world "for granted."