These sayings resemble a similar concept in Eastern religions, including Hinduism and Buddhism. That concept is known as karma. Karma means “action" and it's considered to initiate the cycle of cause and effect.
The basic idea that people express when they refer to karma is that our intentional actions will have consequences. Good actions will lead to good consequences, and bad actions will lead to bad consequences. For example, you may hear people use the phrase “bad karma" to refer to the idea that one can expect negative consequences to result from bad actions.
Different religions look at karma in different ways. For example, in Hinduism, a supreme being is seen as playing the role of the dispenser of the consequences of karma. In other words, bad actions will result in the supreme being sending bad consequences your way.
In Buddhism, though, a supreme being is not involved. Instead, karma is seen as an inherent principle of the universe or a law of nature. In other words, good actions lead to good consequences naturally without any need for intervention by a supreme being or anyone else.
Over time, karma has evolved into a general concept that many people don't associate with a specific religion. Indeed, many people see it as a psychological phenomenon that can be counted upon, like physical forces such as gravity.
So do you believe in karma? It may be impossible to prove or disprove karma, because the consequences of our actions, if there are any, might not necessarily show up in a timely manner. The more time passes, the more difficult it is to connect consequences back to their actions.
Your own personal experiences, though, have probably taught you that treating others well will lead to establishing valuable friendships and happiness. On the other hand, mistreating people often leads to hard feelings and unhappiness.