Probing the Standard Model and beyond through h to gammagamma decay