If you are thinking of putting your book into print, whether it's through print-on-demand, or any other self-publishing print venue, you will need an ISBN. You will also need the barcode that is normally found above (and below) the ISBN. (These can be purchased throughBowker, or obtained free at http://www.tux.org/~milgram/bookland/) Without an ISBN, no library will ever order your book, no book store will stock it, no one will review it – your book may as well not exist.
When you don't need an ISBN
If you are epublishing, you don't need to purchase an ISBN. Amazon doesn't require one. (Amazon assigns its own code, an ASIN number). Barnes & Noble has gone that route as well. If you decide to distribute your ebook through Smashwords, they will assign an ISBN from their own stock. (The long string of numbers in the middle of the ISBN code will identify Smashwords as the publisher.)