How can bitcoins have value?
Bitcoins have value because they are scarce and useful.
They are scarce because only 21 million of them will ever exist.
You might think that because bitcoins are digital, they can be copied, just like any other digital file, but the public Bitcoin ledger prevents this from happening. When Alice transfers 10 bitcoins to Bob’s bitcoin address, the transaction is forever recorded in the ledger, and Alice cannot spend those 10 bitcoins somewhere else, because the ledger already has recorded her transfer to Bob.
The 21 million limit is enforced by all of the users in the Bitcoin network – if Bob tries to create more than 21 million bitcoins, the rest of the network would simply (and automatically) ignore his attempts, because he isn’t following the same rules that the rest of the network is. It would be like someone attempting to use money from The Game of Life in a rousing round of Monopoly – the rest of the players simply would not accept it.
They are useful because they accomplish some financial tasks better than existing financial institutions. Remittances and bank transfers can be much cheaper ($0 fees instead of $40 fees). Merchants can save on credit card fees and chargebacks. Transactions can be completed without requiring a bank account or street address. It can be used as a store of value, similar to gold, especially for those in countries with chronic inflation such as Argentina.
Now remittances are still limited to certain countries and areas, the number of merchants accepting it is still small, and using Bitcoin as a store of value is worrisome because of the volatility that still exists in its value, but each of these areas is improving as time passes. Bitcoin will likely become more and more valuable as use in each of these areas increases.