Can thoughts materialize? Many people believe that their good or bad thoughts can materialize in the future. So some people try to be always in good mood and think positively. Others are not so happy and just try not to think about bad things too often to prevent them from happening. And finally there are large groups of people that pray to some god. Can thoughts of all these people materialize into a real events, creatures, things? At least sometimes?
Many people believe that their good or bad thoughts can materialize in
  the future


Yes, this is called Kamma. Good thoughts have the potential to cause good consequences. Bad thoughts have the potential to cause bad consequences.
But the Buddhist way of identifying a good/bad thoughts has nothing to do with positive/negative thinking.
If a thought is tainted with craving, aversion and ignorance, it is a bad thought. If not, it is a good thought.

ex: Going after a mirage, thinking that it's a real stream of water can be a positive thought, if you really believe in it. But it's not going to bring intended results. Thinking that slaughtering animals and offering them to a god/demon will result in a good harvest can be a positive thought. But it is a bad thought according to Buddhism. Thinking that there's an all loving, all governing god who's going to save you from suffering can be a positive thought. But it is a bad thought according to Buddhism. Thinking about impermanence, suffering can be taken as negative thinking. But they are good thoughts according to Buddhism.  

All bad thoughts have the potential to give repercussions. But not all good thoughts give future results. Ex: the thoughts of enlightened being are called Kiriya citta. You could call them neutral, but they are good since they don't cause harm.


  So some people try to be always in good mood and think positively.
  Others are not so happy and just try not to think about bad things too
  often to prevent them from happening.


This is not possible! Bad and good things happen because of causes. If the causes are not present for something to happen, you simply can't make it happen, regardless of your mood.
To take the same example, just because you pray to a god, you won't get the things you pray for. There should be someone listening, who is in a position to give you what you want. And that being should decide to help in the way you want.