All four words describe someone who looks good in their clothes, but they differ in emphasis. 'Well-dressed' is the most general — it simply means the person's clothes are neat, appropriate, and chosen with care. 'Elegant' adds a sense of grace and refinement that is more formal. 'Stylish' points to current fashion: a stylish person wears what is trendy. 'Dapper' is reserved for men and implies a crisp, neat, almost polished look. 'Smart' (especially in British English) overlaps with well-dressed but is often used for a clean, sharp appearance suitable for work or formal events. For example, a smart suit or a dapper gentleman. A stylish outfit may not be well-dressed in the neat-and-appropriate sense, while a well-dressed person might not be chasing trends the way a stylish person would.
Formed by combining the adverb 'well' (meaning 'in a good or satisfactory manner') with the past participle 'dressed' (from the verb 'dress', meaning 'to put on clothes'). This compound pattern — adverb + past participle — is common in English and produces adjectives such as 'well-known', 'well-read', and 'well-educated'. The word has been in use since at least the 1700s.