There are two ways to answer this question.
First, if the question is "why may states have different punishments..." the answer is federalism. States can have different punishments for various crimes because the founders of the country wanted to have a system in which the states had a fair amount of autonomy. They didn't want the national government to have too much control for fear it would tyrannize the people in the various states. For this reason, they allowed states to set up their own systems of criminal justice.
Second, if the question is "why do states choose to have different punishments..." the answer likely has to do with political culture and attitudes. For example, some states like Texas have the death penalty and use it very often. Other states, like New York, do not have the death penalty at all. This is because the people of those states have different attitudes about crime and how criminals should be punished.
Thank you so much dude!!!!!!!!!!!!!!!!!