I think many here are mistaken that yoga/meditation are of Buddhist origins. They are in fact of Hindu origin.
Yoga mainly focuses on 1. Exercises that stimulate the base of the spine, and 2. Breathing technics. If you imagine the brain as a flower and the spine as a stalk/root; a flower needs stimulation at the root for it to blossom. The focus on breathing is to get more oxygen to the brain. Combinedly these two help improve the potential of your brain.
Yoga does not necessarily make you a good person. It just enhances the knowledge/potential of your brain. You can use that advanced knowledge to become a good person or a bad person.