Javascript (94)
h="";while(!h){n=0;for(i in a){n+=a[i]*a[i]||0}n==4?h="Unhappy":n==1?h="Happy":a=n+""}alert(h) Input is provided by setting a to the number desired.
h="";while(!h){n=0;for(i in a){n+=a[i]*a[i]||0}n==4?h="Unhappy":n==1?h="Happy":a=n+""}alert(h) Input is provided by setting a to the number desired.