Is insulin shot or pill better way to treat diabetes in pregnancy?

Either. It depends on the severity of your diabetes. The whole goal is to lower blood sugar to an acceptable range. Use option that will bring you there and maintain you there until after delivery. Your doctor should know which one to use on you.