Wiring a new pendant light to an existing ceiling box
It absolutely makes a difference.  If you attach the hot from the mains to the ground on the fixture, it will most likely energize the entire fixture body (extremely dangerous). Assuming that you're in the United States (or another 120v country), there should be a faint green stripe visible through the insulation on the ground wire.  If you can't make it out, use a multimeter or continuity tester to check for continuity between the base of the socket and each wire.  The one that gives a continuity reading is the hot.  Then double check your result by testing continuity between any metal part of the fixture outside of the socket with the other wire. A ground wire should give a continuity reading to pretty much any other part of the fixture outside the socket that is conductive.