This would be my take on it:
'Good' and 'Bad' are relative concepts that have different weights when seen from different viewpoints (personal, kin, clan, species) , that which is good from a personal viewpoint (fulfilling my desire to torch a building) is bad from a kin/clan viewpoint (possible injury, loss of resources) and so on. Sexual immorality is good from a species viewpoint (if gene mixing outweighs sexual disease propagation) but bad from a kin / clan viewpoint and so on. Local conditions can flip these rules as well (war will make the act of killing a temporary clan virtue for the winning side.)
There is a further part to this equation, cost, does this action have an opportunity cost that overall outweighs the benefit (allowing a child to set fire to a building will have an excessive opportunity cost - lost resources, utility and labour - to the small benefit - the child's ability to act.)
Thus , it may indeed be wrong for homosexuals to marry under certain circumstances (to be extreme let's say it causes the spread of a deadly disease that threatens mankind) or the cost of allowing their self determination may be too great in terms of opportunity cost (all heterosexual men have died from a pron virus! and not enforcing gay men to procreate with women will end mankind.) It may indeed be right for children to be allowed to burn buildings (war sabotage) and so on. I will return to this point.
The question is not therefore an appeal to a Platonic perfect concept ('good'/'bad') nor a question of what was considered good or bad yesterday. It is an evaluation of what is good or bad today. In a highly religious country it may be bad to allow homosexual marriage because the result will be mob violence and lynching of those couples, in other words the opportunity cost is too high as it results in physical harm and death. In a more tolerant (dare I say - normally secular) society the cost of homosexual marriage is low, the consequences are low and the happiness of self determination and cultural acceptance is very high. The cost of allowing a house to be burnt however, is still very high and the benefit very low.
Final point. As society gains more freedom from necessity and more resources to satisfy desire the moral goalposts shift, imo, as we can begin to allow deviation from the norm. That which was immoral or 'bad' can reverse. Here's a common example. I am free to go to a PC and by virtue of free time , technology and abundant resources and in a virtual world shoot and maim virtual people. At no stage would it be defensible to say that killing people is a standard 'good' behaviour but technology has reduced it's cost so low that the benefit of my adrenaline fueled high arguably outweighs the cost, it becomes permissable and good (to me) and tolerable to society (low to zero cost). There is a contentious edge to this - in a world of virtual options where it is already possible to perform the very worst of human crimes (killing) there is an argument that people who enjoy burning houses or abusing children should be given virtual environments in which to experience who they are by nature. In short we may be entering a golden age where we no longer need to deny who we or anybody are as long as we learn to express that in safe, virtual environments. Once we have removed , by resource abundance, the need to hurt or use other real people what was good or bad today may not be so tomorrow. imo.
TL:DR Concepts of good and bad are relative to viewpoint and current local conditions.