Good thoughts affect our life positively. Evil thoughts affect our life negatively. So the scriptures invite us to fill our minds with good thoughts:
“Finally beloved, whatever is true, whatever is honourable, whatever is just, whatever is pure, whatever is pleasing, whatever is commendable, if there is any excellence and if there is anything worthy of praise, think about these things” (Christianity, Phil 4:8).
“Mind is the forerunner of all evil states. Mind is chief; mind-made are they. If one speaks or acts with wicked mind, because of that suffering follows one, even as the wheel [of the cart] follows the hoof of the draught ox.
Mind is the forerunner of all good states. Mind is chief; mind-made are they. If one speaks or acts with pure mind, because of that happiness follows one, even as one’s shadow that never leaves” (Buddhism. Dhammapada 1-2).
“Let a man strive to purify his thoughts. What a man thinks, that he is: this is an old secret…. Dwelling within his Self with serene thoughts, he obtains imperishable happiness. If the thoughts of a man were fixed on Brahman as they are on the things of this world, who would not then be freed from bondage?” (Hinduism. Maitri Upanishad 6.34.3-7).