The different expressions represent how happy your buddy is and are based on Emotion points (EP) which you gain by carrying out certain activities with your Buddy. As you gain EP your Pokemon expression will change as he becomes more happy until you have 32 EP and your Pokemon becomes Excited. Your buddy can also be made excited immediately by feeding a Poffin however this item is rare in AR tasks.
As shown in this image we have multiple ways to get Emotion Points (EP). Some activities will only give you 1 EP every 30 min while others have no limitation such as walking 2km. These EP's will stack on top of each other until you reach 32 EP's and your buddy becomes excited. Your buddy will stay excited if you continue to interact with your buddy. If you do not interact with your buddy, your buddy will lose 1 EP every 30 mins.