I am going through the problems from Project Euler and I notice a strong insistence on Primes and efficient algorithms to compute large primes efficiently.
The problems are interesting per se, but I am still wondering what the real-world applications of primes would be.
What real tasks require the use of prime numbers?
Edit: A bit more context to the question: I am trying to improve myself as a programmer, and having learned a few good algorithms for calculating primes, I am trying to figure out where I could apply them.
The explanations concerning cryptography are great, but is there nothing else that primes can be used for?

The most popular example I know comes from Cryptography, where many systems rely on problems in number theory, where primes have an important role (since primes are in a sense the "building blocks" of numbers).
Take for example the RSA encryption system: All arithmetic is done modulo $n$, with $n=pq$ and $p,q$ large primes. Decryption in this system relies on computing Euler's phi function, $\varphi(n)$, which is hard to compute (hence the system is hard to break) unless you know the prime factorization of $n$ (which is also hard to compute unless you know it upfront). Hence you need a method to generate primes (the Miller-Rabin primality checking algorithm is usually used here) and then you construct $n$ by multiplying the primes you have found.