I am not sure I understood your question correctly. Let me try two ways:
1: If you are talking about the source of materials/information that provides hourly price variations in a location, the market operators (like my company) publish even 5-mins prices so you just have to go and grab and do whatever you like.
2: if you are talking about WHY prices vary during each hour or 5-min, that is because of the optimization problem formulations and modeling of relevant objective function, equality and inequality constraints etc.
Let me know if you want to discuss more on any of my answers.