It is another way for the King of Westeros (and only the King) to identify himself. Example: Henry VIII: We would say "Henry the Eighth." In the Westeros version, he would be Henry, the Eighth of His Name. He was the 8th king of England to be named Henry. Not all of the previous seven King Henry's were related or direct descendants.
So Robert Baratheon is called the First of His Name because he is the first King of Westeros to be named Robert. Joffrey is called the First of His Name for the same reason. Hypothetically, if Joffrey had a son named Robert, who grew up to be king, he would then be Robert, the Second of His Name (Robert II) because he would be the second King of Westeros to be named Robert.