I always recommend [dressing] for the occasion or environment you are in, and just as you would dress more formally for a nice restaurant, you are expected to do the same when flying. This is not only out of respect for the establishment, or airline class, but for the other passengers onboard your class.