Why tube amps have a special sound

Tube amps have a different tonal quality from solid state amps, and this is why they are preferred by many guitar players. The classic tube sound is produced when the tube (valve) is overdriven and distorts the waveform. Valve distortion is characterised by 'soft clipping', as well as other effects which are explained well in Merlin Blencowe's book 'Designing Tube Preamps for Guitar and Bass'.  It is difficult to emulate these effects using solid state electronics.

The picture shows soft clipping distortion  (upper trace) ; the lower trace is the undistorted signal.  The amount of distortion used is entirely a matter of taste, but the scale below shows the degree of distortion typically used in musical genres (as described by Merlin Blencowe):