The idiom between the devil and deep sea refers to a state of hesitation. When someone is between the devil and deep sea, s/he is not in a position to decide which way to go, since all the ways seems to be equally unfavourable or negative.
A similar idiomatic expression is between Scylla and Charybdis.
1. Ram was between the devil and the deep sea when his friends called him for a help in an illegal activity.
2. The thief was between the devil and the deep sea when the bank's doors were shut and the siren went off.