The notes (or rests) that come right after a bar line have the strongest beat. We call it 'ONE'. So whether you're playing a tune that feels like 'ONE, two, three, four', or 'ONE, two, three', you'll always know when that strong beat is coming around.Bar lines also help your eyes to find your spot on the page, or to help a group stay together, because you can say, 'STOP! Everybody let's go back to bar number 3,692!'
Hope that helps,
~black walnut