Samson is dedicated to God from before he is born he has kind of a wild youth. He kills a lion with his bare hands, he marries a Philistine, and his wife loses him a bet, so he splits with her, he basically is what we would call today an out of control teenager.
His second wife betrays him and turns him over to his enemies, but in the end he regains his strength and defeats the Philistines.
This is another of those stories, like Gideon, God can use anyone. Samson's life story does not read like that of a holy man, but he does what God tells him to do in the end.
It is not our holiness that makes us useful to God, it is our willingness to do His will.