Swell was first a verb, then a noun, then an adjective, and lastly an adverb. Ultimately, the adverb of 1856 comes from the adjective of 1810, which comes from the noun senses from the late 1700s, which came from noun senses from the early 1600s. All noun senses
ultimately came from the verb swell, whose original form in Old English was swellan. It can be found back in Beowulf.
The use of swell adj. to mean fashionably dressed or first-rate derives from an attributive use of the OED’s sense 9 of swell n.. The slightly earlier sense 8 seems to have led up to this. Here are noun senses 8 and 9, with subsenses:
- 8 a. Of a feeling, emotion, etc. (cf. swell v.7). Now rare or Obs. 
- 8 b. Proud or arrogant, or (in later use) pompous or pretentious air orbehaviour; (a piece of) swagger. to cut a swell, to ‘cut a dash’, swagger. (Cf. swell v.9, 10)? Obs. 
- †8 c. Turgid or inflated style of language. Obs. 
- 9 a. colloq., orig. slang. A fashionably or stylishly dressed person; hence, a person of good social position, a highly distinguished person. 
- 9 b. transf. One who is distinguished or eminent in achievement; one who is very clever or good at something. 
So the noun went from various earlier general senses of a purely physical expansion, moved on to things like the sea, sound, and music, and then took on extended senses related to an inflated style of dress or presentation of self, even pompous and pretentious. Think of a dandy. It was these that led to the adjectival use. You should probably look at some of the verb senses that came into existence from the same time period, because they are related to the noun uses we’re talking about:
- 9 a. intr. To show proud or angry feeling in one's action or speech; to behave proudly, arrogantly, or overbearingly; to be ‘puffed up’; to look or talk big. Obs. or arch. (partly merged in sense 10). [a1250]
- 9 b. Used in reference to turgid or inflated style of language. 
- 10. To behave pompously or pretentiously, swagger; to play the ‘swell’. Also with it. 
So the verb fed the noun, which fed the adjective. Here is the full adjectival entry, modulo detailed citations. Notice it starts out with senses related to fashion, just like sense 9 of the noun, and then extends from there.
Etymology: attrib. use of swell n. 9
colloq. Now chiefly U.S.
- a. Of persons: Stylishly or handsomely dressed or equipped; of good (social) position; of distinguished appearance or status. More recently, in weakened use as a general expression of approval. .
- b. Of things: Distinguished in style; stylish; first-rate, tip-top. Also similarly weakened: ‘great’, ‘fine’, etc. 
- c. swell mob n. a class of pickpockets who assumed the dress and manners of respectable people in order to escape detection. Hence swell-mobsman n. a man belonging to the swell mob. slang. Now Obs. or Hist. 
- d. pred. Most pleasant or kind; very effective; ‘splendid’. U.S. 
- e. int. As an expression of satisfaction. 
Second edition, 1989; online version March 2012. http://www.oed.com/view/Entry/195717; accessed 05 June 2012. Earlier version first published in New English Dictionary, 1919.