Rashi explains the gemara in Sotah to mean that they first thought, based on the pasuk in Tehillim, that Shemesh is one of the names of Hashem, which is where Shimshon got his name from. However, the gemara concludes that in fact Magen, which is in the same pasuk, is one of Hashem’s names, and therefore the name Shimshon describes how he is similar to Hashem; just as Hashem is the protector of the entire world, so too Shimshon was the protector of the Jewish people in his generation.
The Maharsha further explains how the name Shimshon is similar to Hashem’s name of Magen: “The intention in this gemara is that the attribute of mercy and judgement is shown in Him depending on who is receiving the attribute for example just as the sun does different and opposite things according to those that receive its benefits. Shimshon acted similarly to this manner for even though his essence stemmed from the attribute of power and strict judgement for he was an enforcer of justice, stemming from the tribe of Dan as it says in Pesachim 4a, however when it came to the Jews he approached them with mercy to protect them. The ‘nun’ at the end of Shimshon is alluding to the Jewish people that he was their sun and protector.” (Click here for Hebrew text.)
The Maharsha has a very interesting analogy to explain why Shimshon received his name, and who he was. Shimshon is derived from the word shemesh [sun], and the letter ‘nun’ was compared to the sun, which can be used as a description for how Hashem takes care of the world. Just as the sun reflects good and bad into the world, judgment and mercy, so too the sun’s rays give plants nourishment to grow. Yet, just as the sun can cause burns, Shimshon also showed strict judgement in using his brute strength on the Philistines as a punisher for their brutality against the Jewish people; yet he was showing mercy to the Jewish people by acting in their defense.
Shimshon was known as one of the strongest people in world history, receiving G-D given strength in order to defend the Jewish people against the Philistines, who tormented them during that period of history. Shimshon was a one-man army, a punisher, a stealth enforcer of justice who was almost unbreakable. Even the end of his life came in the defense of his Jewish brethren. Indeed, strict justice was a part of his social makeup, for he came from the tribe of Dan, who were blessed with the quality of being able to see clearly the fine lines of right and wrong. Though Shimshon seemed to have been a natural and perfect fit to be the ultimate one-man defender of the Jewish people, without the attribute of mercy it would seem he would not have been the success story that he was. Why is that?
It would seem that without the attribute of mercy a person cannot adequately and wholly defend others. A person might be trained to be a warrior, seemingly scared of nothing; stealthy and ready to take on anything; yet without feeling the attribute of mercy towards those he assigned to protect, he will not be successful in their defense. Something will cave. His passion to save them at all costs will simply not be there, if he does not feel mercy for those he is defending.
Shimshon was imbued with and lived by both the qualities of justice and mercy. He exemplified the emulation of Hashem in those attributes, and therefore his name suited him perfectly.