Abu Hurairah RA narrates that Rasulullah SAW said:
"The world is a prison for a believer and paradise for a disbeliever." (Mishkaat, Mi’raaj)
Just as a prisoner is bound to the strict rules and regulations of the prison, similarly, a believer is bound to the strict rules and regulations of Shari'ah.
The life out of prison having no restrictions for the prisoner is regarded as paradise. Similarly, a disbeliever in this world is also out of prison i.e. not adhering to the rules and regulations of Shari'ah. Therefore - his free life in this world is like paradise.
However, Allah has created and moulded that the life of this prisoner (adhering to Shari'ah) is filled with peace and tranquility as opposed to the free person (disbeliever) whose life is filled with grief and agony.
The world is a prison to the believer in comparison to the great rewards he will earn in the eternal Hereafter. Similarly, the world is a paradise to a disbeliever in comparison to the eternal punishment of the Hereafter.