Ask him for a hug.
He's not a mind reader, and this is the best way to get him to hug you. What's more, if you consistently ask him to hug you, you will be telling him that you enjoy being hugged, thus encouraging him to spontaneously hug you more often.
Compliments shouldn't be hollow, sarcastic or fake, but if you like the way his pants look, tell him. The same goes for if you like how he smells, what he made you for breakfast, or anything else that appeals to you.
Ask for his opinion on things.
This will show him how you value his input and will make him feel like a necessary part of your life. This will in turn make him want to show more affection and hug you more often.
Be nice in general.
This is not possible 100 percent of the time, but the nicer you are the more your man will want to hug you. This doesn't mean you should be a pushover, but it does mean that you should let small transgressions go and generally relax. This will make him happier and more content in the relationship, which will show in his affection toward you.