A recent newspaper article said that players can choose any number they want, as long as no one else in the team has taken it first. For example, Rohit Sharma wanted the number 10 jersey, but he couldn't have it, Sachin tendulkar already has it.
It is also not compulsory for every player to have a jersey number, for example Virendra Sehwag (in the Indian Jersey - I don't know about IPL).