My general rule of thumb with many types of skill checks is that I allow them to make rerolls when, like Utsanomiko says, some resource has been spent.
In structured time, this usually means you can reroll on your next turn. If you're trying to slice a computer or pick a lock in structured time, it usually means somebody's shooting at you or trying to stop you. So I allow them to keep doing it until they succeed, because they're exposing themselves to danger while they do it.
In non-structured time, I describe a single roll as representing the absolute most effort that the group can put in without significant time passing. So it's usually not a case where they can or would want to reroll right away. They could try again later that night or the next day or something like that.