How is the real world value of bitcoins generated? I do not understand where the value of the bitcoin comes from.

In old times people were trading in gold or silver. They began to deposit the gold coins in banks and started to trade with these deposit certificates. The deposit certificates became paper money. Then the convertibility of paper money for gold was abandoned, but the paper money had its momentum so it remains in use today.

But how did bitcoin get its momentum? I understand that to get bitcoins, you need to compute some cryptographical puzzles, so the amount of bitcoins is proportional to the computational time spent. But is this computaitonal time spent usefully as in industry, or is it just spent for the sake of gathering the bitcoins?
BTC works as any currency. As long as people see value in it, it has value.

The momentum was just the curiosity the users had... Also the whole "Make free money with your computer"- thing which was started.

A big influence was the famous "How does bitcoins work" video I saw on vimeo. That got ME started at least. (Link to updated version)

The algorithms your computer solves when "mining" isn't used for anything no.
There are also other kinds of crypto currencies on the rise. The most notable is Litecoin. It uses a different algorithm. (Scrypt, instead of BTC's double sha256). The point of Litecoin was to make users able to "mine" more efficiently on their CPU's.

I hope this somewhat answered your question.