Getting a guy to hug you is really a matter of getting him to be more affectionate in general. While you both may be very happy in the relationship, he may be less affectionate than you, which can make you feel as if not all your needs are being met. So, to get your guy to hug you more often you need to talk to him about it and make him feel wanted. Not only does he need to know that you want him to hug you, he also needs to want to hug you.
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.
Compliment him. Compliments shouldn't be hollow, sarcastic or fake, but if you like the way his trousers 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 per cent 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.