The post was emotionally provoking
People like posts when they are emotionally provoking in a positive way. If the post is emotionally provoking enough, the person might share it as well if it is the kind of post that could be shared. (See 20 Signs That You Are Emotionally Sensitive)
The post matches their views
If the post matches a person’s views then the person is very likely to like it.
Good relationship with the one who posted it
People generally don’t feel comfortable liking the posts of the ones they don’t like. Even if a person writes a good post, it still might not be liked by the ones who don’t like the one who made it.
People sometimes like the posts of others just to socialize and connect with them. A person might like your post, if he doesn’t disagree with it, just to get closer to you.
To compliment others
The motive behind the like can also be complementing others. If a person makes a certain achievement then his close friends might like his post just to compliment him.
They like the person
If someone likes a certain person or has a crush on them then the former is very likely to like the posts of the latter.
The post is amusing
People like and share jokes online when they find them amusing or when they help them express their opinion in a funny way.
Matches their interests
People are more likely to like posts and pages that match their own interests. A person will usually feel annoyed when he sees an unrelated image.
To express approval
People usually like posts to express their approval of what is being said or to express approval of the person who wrote the post. (See Why some people never like your posts on Facebook?)
Why do people like posts on Facebook?
Understanding the Psychology Behind Facebook Likes | Why do people like posts on Facebook?