A curved penis is normal if it has always been that way. Many men think their penis is curved due to masturbation when they were younger, but that is not the case. During an erection, the penis fills with blood, but it does not always fill evenly. You can kind of picture it like the penis has balloons in it. Those balloons fill up with blood. Sometimes the balloon on one side of the penis is longer than the balloon on the other side of the penis. That is the most common cause of a curved penis.
Injury and scar tissue can also make the penis curve. This is more common in older men. Injuries that can cause the penis to curve include, but are not limited to, getting kicked in the groin or the penis being bent during rough sex.
Masturbation is very healthy for most people, so do not be afraid to do it unless your doctor has told you that you shouldn't for some reason.
Since your penis has not always been this way, it sounds like you should talk to a doctor. If you are not feeling pain, chances are it won't be anything to worry too much about, but it's best to get checked out anyway. Most men live just fine with their curved penis and have sex with no problems. In the meantime, avoid tight clothing. Wear something roomy enough to give your penis a bit of room to move.