Morality refers to a code of conduct that is generally accepted by the society to be adhered to by individuals in that society. How society expects any rational individual to behave. Legacy refers to something that is handed down from one generation to another. It therefore follows that the community is the custodian of morals and it is the responsibility of parents, on whom society has bestowed that duty, to teach their children morals and to behave in such a way that their children will be positively influenced to acquire such characteristics as are considered morally acceptable in a society and therefore right.
When a child is born, he has no sense of what is right or wrong. As the child grows, the understanding of what is right or wrong and the expected way of behaving is imparted on him by the parents first, who hold the greatest influence on the child, and by other interactions. This is done with a clear mind that this child is the adult of tomorrow and him too will be expected to impart the same in the generation to come. It therefore follows that morality is a legacy that is passed from one generation to the next. The first caretaker of a child, who in most cases happens to be the parent, has the greatest responsibility in teaching a child right or wrong. The parents are with the child for the most time between birth and seven years of age. This is the best time to shape the child so that by the time the child goes to school to encounter peer influence he will have acquired a certain character regarding right and wrong. The children will the go to school where peers and teachers will influence them. With time they learn how the greater society expects them to behave.
Religion also propagates morals. A child from a catholic family may have a different perspective of right and wrong from a child brought up in an evangelical church. For example while to the catholic drinking alcohol is right, to the evangelical it's wrong. The church therefore is a strong custodian of morals teaching it from one generation to another.
In conclusion, the question of what is right or wrong is bequeathed from one generation to another forming what we can refer to a tradition. This tradition is passed on from one generation to another and can therefore be called a legacy.