Check the temperature and housing so that you are sure they meet proper requirements. Sometimes snakes will become irritable if they're sick or in improper conditions. When is the last time the snake ate?
How old is the snake?
Most ball pythons are really docile, but there are that are plain irritable. You may just have to work slowly at acclimating it to handling.