If you mean you play with volume, as Rognvald has said, there is nothing wrong with that. But if you are comparing your playing with a hammer because you are unable to play a legato melody line, then that is another issue.
I know of two things (at minimum) that can cause lack of legato sound. Lack of synchronicity of right and left hand, and not knowing the exact moment to let go with the fretting hand (either too soon or too late). They are two slightly different things, but will have the effect of shortening and separating notes and lead to a non-legato sound.
To work on the first, synchronicity, my teacher gave me several exercises. While playing a C scale with metronome, place both the fretting finger and the plucking finger at the same time on the string, but do not press down the fretting finger...just rest lightly on the string. Both are now placed. On the next metronome click, depress the string simultaneously with both fingers and play. So the pattern is prepare, then play, prepare, then play. Do this at a speed where you are totally aware of *when both fingers* touch the string. For me, the hardest thing was not to press the fretting finger down immediately, well before the plucking finger had depressed the string. This prepare/play is the default timing. Sometimes the music requires a change in timing, but those would be exceptions. Practicing this while doing scales for just a few minutes a day helped a great deal with synchronicity.
For letting go too soon or too late with the fretting hand in a musical passage, my teacher had me practice the moment in the passage where it was not legato and find the *exact* moment I needed to move. My tendency was to move too soon because I *thought* I didn't have enough time to get to the next place! For getting there too late, he had me use dotted rhythms. Somehow, in a funny way, that seems to change the perception of time so what you thought was not enough time really is enough time and it seems to smooth the gaps in legato playing. I can't exactly tell you why it works, but it has for me.
When the sun shines, bask.
Classical Guitar forever!