In 'Advaita' (non-dual) Hinduism, the problem of evil does not exist, it is short-circuited; since what is good and what is evil is part of one whole (Brahma satyam - Brahman is the truth) - and what is perceived is an illusion (jagan-mithya, the perceived world is an illusion). The eater and the eaten is the same, the killer and the killed is the same, the oppressor and the oppressed are the same; so hurting another is hurting yourself. Good and evil exist because of absence of 'jnana', not knowing. If one knew better, one would not indulge in evil. Atoms and molecules again, energy, Brahman, the ultimate substrate, which constitutes everything.
Buddhism short-circuited the problem in its own way. It did not dwell upon why good and evil exist, they exist because of absence of 'jhana', not knowing. If one knew better, one would not indulge in evil. Buddhism debated on how it may affect one and what is the best course of action for one's peace of mind and happiness and that of others.