photons and phonons both have polarization, we attribute spin 1 for photons but spin 0 for phonons. Why?
Yes, and no.
Since the group of rotations is not a continuous group in real crystals, it is not possible to define spin in a meaningful way. It is only in an isotropic ideal medium that is possible to define spin for a phonon (quantized accoustic wave). Equivalently it is only possible to define a spin if the the wavelength of the phonon is long or if one is restricted to phonons in special directions. It is only in such case that one can say that longitudinal phonons have spin 0 and transversal phonons have 1.
From this article A.T.Levine, "A note concerning the spin of the phonon" you can read in the conclusions:
... Thus, the spin of the phonon will be well-defined in a medium which is isotropic but for a real crystal it will be well-defined only along certain restricted directions of propagation. The precise effects of phonon spin should, in principle, be detected experimentally by observing its interaction with other fields, e.g. spin waves. In any case, it is a quantity of fundamental interest that must be considered in any program of quantization.
Because a phonon is a quantum of "sound" and "sound" is a longitudinal wave while a photon is a quantum of "light" and "light" is a transverse wave (an electromagnetic wave).
For example, if two waves are moving in the $z$ direction, the sound wave moves the molecules of the medium in the $z$ direction as well, up and down, one possible direction. Effectively, one may describe the sound wave by a scalar, by an oscillating pressure, if you wish.
However, the light has an oscillating electric field which oscillates in a direction orthogonal to $z$, i.e. either in $x$ or $y$ or some combination (the magnetic field is the third axis, one proportional both to the direction of the wave and direction of the electric field), so there are two independent polarizations of light (and photons). For electromagnetic waves, it's vectors (electric and magnetic fields) that are oscillating which is why it's spin one.
I am sure there is a deeper explanation, but here is my take at a heuristic one: Spin is intrinsic angular momentum, and phonons do not have that. The spin of the photon is “fundamental” in the sense that you have to postulate it. But the phonon is a collective excitation, so any spin you would assign to it would have to come from its constituents, and the vibrations making up a phonon do not have angular momentum.
Another thing that might be relevant: If memory serves, the tight connection between spin and polarization in photons is a consequence of their being massless (and moving at the speed of light, which even massless phonons do not do). I do not remember how exactly that goes, maybe someone else can elaborate.