Why do prokaryotic cells have no nucleus?
The most straight-forward answer would be that they do not need one.
Since prokaryotes evolved first, it may be more relevant to ask why do eukaryotic cells have a nucleus? Click here to see more
This article suggests that the evolution of the nuclear membrane allowed the separation of the processes of translation from transcription. This allowed greater control of these two key cell functions.
I would also suggest that a nucleus is helpful to contain the numerous chromosomes found in eukaryotes. This is not an issue for prokaryotes, which only have one loop of DNA (see here ).
Just to add to previous answers:
Prokaryotes do have their genomic DNA concentrated and localized to a small area within the cell (nucleoid region). So it's not entirely accurate to say that prokaryotes don't have a nucleus. They do however lack a 'true' nucleus that is membrane bound.
Having no true nucleus has its own advantages. Prokaryotes can take in genetic material (plasmids, etc) from their surroundings and become protein manufacturing factories from whatever genetic code is put into them, provided the raw material (amino acids) is available. This can be seen as the ability to 'borrow information' from other successful organisms to survive in a particular environment. This however also makes the prokaryote more susceptible to viral infections, because the transcriptional and translational machinery is naked and easily accessible to the virus.
So why would evolution of a 'true' nucleus happen at all? What is the advantage?
One hypothesis is that having core genetic material enclosed and separated from the rest of the cytoplasm enables the cell to better combat viral infection. The cell can release DNAses into the cytoplasm to degrade viral DNA, with reduced risk of degrading it's own DNA. Also viral DNA would have to traverse an extra barrier (the nuclear envelope) in order to reach the site of DNA replication, transcription and translation, making it harder for them to 'infect' the cell.
With the evolution of multicellularity, there was a need for multiple specialized cell types, a need to be able to package proteins into vesicles, exocytosis, endocytosis and long range communication. All of this is enabled by the appearance of membranes - a nuclear envelope that is continuous with the ER and vesicular budding into the Golgi.