Mainly because of the characteristics of the pelvic joint with the femur and the foramen magnum (the hole the spinal cord uses to connect with the encephalon). Also, there are more specimens other than Lucy, and there also exist fossil footprints (for instance the Laetoli footprints). All this evidence points to a bipedal walking.
As you can see, the Asutralopithecus pelvis resembles human pelvis more than chimpanzee's (wich is adapted to a primarily quadrupedal movement).
In this image you can see the position of the foramen magnum in a typical pure quadrupedal mammalian, such as a dog. The foramen inserts in the posterior part of the cranium. In the human, the foramen inserts in the base of the skull, due to de erected position. In chimpanzees, which have quadrupedal march, but can also display some bipedal movements, the foramen is slightly displaced towards the basis of the cranium, in an intermediate position between both.
Source: http://www.fcnym.unlp.edu.ar/museo/educativa/serypertenecer/principal/australopitecinos.html (Spanish)
In this image it shows the foramen in chimpanzees, Australopithecus and modern humans, and you can see that the position in the second is at the base of the skull, just like in Homo.
It is assumed that the bipedal locomotion is an adaptation to the savanna environment, where trees were rare. Bipedalism also allows a better visual field and it has more energetic efficiency.