Providing a solution manual ensures that students will cheat on homeworks.
But ultimately, it depends on the structure of the course. I generally think it is a good idea to include the solution for fundamental problems, and leave out the solution for the more advantaged ones. And if the solution manual is provided, perhaps allocate less grade percentage to the homeworks.
I've taken courses where the solution for even the basic results were not provided (a course done using the so-called "Moore's method"). So it became a you either get it or you don't type of class and believe me, a lot of people did not get it. The most successful students were also the most popular ones, who were able to crowd-source other students' solutions to reach a consensus. I think it is a very poor way of teaching students when no feedback is provided.