To determine whether to play sharp or flat notes, you need to fully understand the key signature and scales. It is important also that you apply both flat and sharp symbols when changing notes and try and find a balance between sharp and flat notes. If you follow these guidelines, you will have discovered which area suits you best whether sharp or flat notes.
Any notes in the key signature marked as flat or sharp will be played flat or sharp unless a specific note in the song is marked otherwise (an accidental). All other notes will be played natural unless a specific note is marked otherwise. Also note that any accidentals will affect all notes in that measure. ex: if you have an f sharp accidental, then all f's for that single measure will be played sharp. After that measure they will be played natural again.