Incorporating bass notes and bass lines into your piano composition is a great way of adding something extra to you piece, bass lines become even more important for the blues and other contemporary styles but can also be used to give a classical type piece that extra something.
The bass line might be the basses of your piece or it might be used to complement the other parts, usually the harmonies or chords which are in the middle and the melody which is on top, it's also nice to have some fills even higher up on the piano too.
When it comes to keeping the rhythm, no part does it better than the bass line; listen to some blues, pop, or rock songs to here how the bass along with the drums keep the rhythm going. Then when you go back to the piano try to replicate this, and then modify it to match you composition.
Keep the bass lines to the bottom 2 octaves of the piano to start off with and then if needed you can try going a bit higher, but as it's the bass, you want to keep it sounding like a bass. If you start a piece with the other parts then try to match them with the bass line picking an appropriate rhythm and notes.
You can start off with the root notes of each chord, (that's the first note of a chord) then start experimenting with other notes in the chord, to get to the next chord of the song put some passing notes in, so for example to get from C to F you could go C D E F, that's what a bass line is, a line of bass notes.So use the bass section of your piano well and you'll find that extra something to put in your compositions, remember that with the bass, it's more important to have a fantastic rhythm, even if you only have a simple bass part staying on one note for each chord, with a great rhythm it'll sound fantastic. That's not to say that you don't need great lines as well, if you have a great rhythm and a great line, you'll really start to impress. Learn More Here!
I found some great examples of bass lines here!
With some tutorial videos and instructions on forming bass lines.