While Baidu has never formally announced that ICP licenses are a ranking factor, we believe that having an ICP license will help you rank in China. This is because Baidu (and all Chinese search engines) tend to favour results from websites hosted in the mainland heavily. This does not include Hong Kong, Macau, or Taiwan. And to have a website hosted in the mainland, you will need an ICP license.
ICP licenses are required to host sites on servers in China. Having your website hosted in China also has many benefits, the most important of which is that it helps speed up your website. A faster website means a better user experience and better crawlability, which help your rankings on Baidu. Once you have an ICP license, you will also be able to apply for site verification badges (like Baidu Trust) which can greatly increase your click-through rate.