"Get well soon!" and "Welcome back!" are two common ways to greet someone who has just gotten out of the hospital.  You can also ask how they feel and offer support during their recovery.