Of course there are crimes that have been planned ahead of time by evil or very desperate people. But there are young people and others who come to an idea of a criminal act because they have a lot of time on their hands and few resources and so they think of how to get them.
This is evident especially among the youth's of America. It seems that if you let a young teenager have 5-10 hours of freedom wandering their neighborhood for every day of the week, bad things are soon to follow. Someone who is engaged intellectually does not have the time to ponder this sort of criminal behavior.
Yes, idle minds lead to criminal mistakes, because people who do not have enough to do commit crimes. Someone who does not have a job is more likely to stay up late and drink alcohol. Alcohol and staying awake through the night are two of the ways that people commit crimes, because they do not have anything else to do.
In my experiences the kids or adults that act out are often bored and don't find a lot of stimulation in life. Think of summer when kids are most mischievous is because they have nothing else to be doing so they get themselves into trouble. We should always try to having something to do to focus on.
Having an idle mind is given an undue stigma in the world, when in fact there are so many benefits for not having anything on one's mind. While boredom or lack of stimulation definitely leads to crime in some cases, in so many others it leads to productive creativity and imagination.