Hearts are a function of the social part of Castle Story. When you visit a Neighbor or Community Member some Buildings will have a heart on them.
Hearts popped by tapping on them will provide a boost. Resource Buildings will generate extra experience point and other building more coins. Popping hearts also increase your Social Rating.