Literal meaning :
" A believer doesn't get stung twice from a hole (i.e the same hole) "
It means :
A believer should be wise not to make the same mistake twice.
The analogy is :
If you insert your hand into a hole in the rock, and you get stung / bitten ( by the snake or animal living inside ) then you should be wise not to insert your hand again and get bitten for the second time
The meaning is similar to the English proverb
"Fool me once shame on you, fool me twice shame on me"