From what I understand, in Judaism, the idea is mostly that thoughts can lead to physical actions and so thoughts that lead to actions that are considered sins should be avoided. However thoughts are not sins in the sense of the "Sermon on the Mount", with some exceptions. Some commandments require you to love God, therefore hating God would be a sin. Coveting your neighbor, also a thought that is a sin.