The joke is a play on words.  For an argument to 'carry a lot of weight' means it is a sound argument and others can see the reasoning, or that the person who said it is respected by others who value their opinion.  'Weight' however may be referring to the fact that elephants are very large heavy animals.
An elephant ' s opinion carries a lot of weight .