That's just not what the text says though. It says nothing about God condoning Samson's behavior.
Let's get one thing straight here. God will not even listen to a person's prayer if it is not agreement with His will.
1 John 5:14 says, "And this is the confidence we have in him, that, if we ask any thing according to his will, he heareth us."
See, snakes are not good for you. So asking for a snake when you know they can bite you and make you feel sick and or die is not something that is in line with God's will. That's why if you ask for something good in accordance to His will, He will not give you a snake as an answer to your prayer.
We also have to understand that back then, prayers were done from a slightly different focus then the way we pray today. For example: The Old Testament does not speak about praying for your enemies like the New Testament does. Also, the way we treat our enemies is also done differently than the way God's people had treated them back then. Back then it was an eye for an eye and tooth for tooth; But today it is turn the other cheek and do good to those that despitefully use you.
For example: Elisha had cursed a bunch of young youths who were mocking him and God. They were great in number and a potential threat physically to Elisha. So he cursed them and some she bears came out and attacked them. I believe this was because Elisha felt it was not only wrong that they mocked God, but he felt threatened for his life, too. So God protected Elisha by honoring his words of Judgment upon them. Such an action was to snap these dumb youths into fearing the Lord their God so as to repent.
So you see, it was not that Israel and the prophets were doing bad things. No, no. Most certainly not. God's Judgments (Whether they are issued forth in the form of venomous serpents, or carried out by His people), are always a means of destroying the works of the devil and bringing about the goodness of the Kingdom of God in people's lives (Who are open to receiving Him).
Sure, the Philistines could be unjust for gouging out his eyes, but justice is hardly found in killing as many of them as possible as response. That's unjust punishment for gouging out his eyes. Basic reciprocity should be enough to see that the response by Samson was unsuitable for the crime committed, but if you need something more explicit than human moral intuition, there is Exodus 21:23-25.
You have no basic understanding of what happened in the story. Samson revealed that the secret of his strength resided in his hair. For he said that if a razor had come upon his head he would become as an ordinary man in strength (Judges 16:17). This was a special blessing by God. Scientifically, there is nothing that proves that a person is stronger with longer hair. For the Spirit of God came upon Samson when he was fighting a lion and he beat the lion. Generally lions are more powerful then men. So you see, it was the Spirit of God that gave Samson his strength.
This then leads us to the conclusion that if Samson destroyed the two pillars after praying to God so as to help him, it was clearly done by the power and Spirit of God (Like all the other previous times). It was God answering Samson's prayer.
For Samson acted in faith and not unbelief. Samson trusted in God to bring vengeance upon his enemies. For without faith, it is impossible to please God. For Samson could have went lone wolf in trying to get vengeance on the Philistines. But he didn't do that. He prayed to God and God answered his prayer by Samson trusting in God. For when we trust in God by faith, we are loving God. When God abides in our life we are abiding in love because God is love.
Sure, the Atheist and the doubter of God's Word will say that Samson acted out of personal vengeance or revenge. However, if this was the case, then why didn't Samson try to take revenge without the help of God? Why did God answer his prayer? How could Samson have the strength to take down the two pillars on his own without God? If Samson believed he could do this on his own power, then why pray to God about it?
See, what you propose doesn't make any sense, my friend.
God is love.
Even in his Judgments
(Because it is putting an end to that which is evil - So as to usher in that which is good).