The door of his mind was wide open (due to him/Scott/Allison "dying"/going into their subconscious' in 3A) making him extremely vulnerable, and letting in a little darkness.
Allison and Scott only suffered from hallucinations but Stiles mind remained open and the Nogitsune fought it's way inside.
I don't think there's really any canon reason why it chose him over Allison (though it maybe didn't choose Scott due to the "can't be a mbwa mwitu and a fox, mbweha at the same time").
But I'm personally glad it chose Stiles, because that was some of Dylan's best acting, it was so awesome to get to see him play a villain! Best villain on the show, imo. But I'm super happy that it got taken care of and we got our Stiles back <3
The nogitsune picked Stiles because the nogitsune looks to posses someone weak and dark. After 3a when Scott, Stiles, and Allison went "dark" to find Chris, Melissa, and Sheriff Stillinski, they allowed darkness into their life. Deaton explained that the darkness would stick with them, so when the Nogitsune found Stiles, it saw the weakness and darkness that was in him and possessed him.