Play tones based on the chord. Say you have a C major (C, E, G). The easiest way to develop a melody is to play the chord tones. You can use other tones outside of the chord in passing. Once you get comfortable with that, it's open for experimentation. Some tones outside of the chord tones will sound good, some wont, just practice.