At the specific moment you cite, Curley has become more cocky for two reasons.
First, he and his new wife just got married two weeks ago. This makes him feel like a pretty big deal around the ranch because no one else really has anyone special. It also makes him a little leary though because he thinks everyone likes his woman.
Second, Curley just walked in and found George and Lennie. Lennie's stature is pretty big in comparison to Curley. The swamper explains to the reading audience that Curley struggles with big guys. He seems to have a chip on his shoulder about them. He feels inferior in size and tries to make up for it by acting even tougher.