The role of the right and left hands depends on the style of music you are creating/playing. For accompaniment, left hand covers bass lines while right hand plays chords, like Carole King for example. The melody line is covered by the singer or other instrument.
If the piano is playing solo pieces, left hand covers bass and chords while right hand is playing the melody line, as with Fats Waller stride piano style.
These are the two main approaches to playing piano.