The United Arab Emirates (UAE) are a collection of individual Islamic entities that function essentially as monarchies, with a degree of collective decision-making at the national level. The nation is explicitly Islamic, with Islam being the state religion and Islamic religious law being the main source of legislation. There is codified freedom of religion, only with the vague exception that it does not extend to violations of "public morals." Legislation against blaspheming Islam exists, as well as against "condoning or encouraging sin," which would apply to both blasphemers and apostates.
Being situated on the Arabian Peninsula, the lands that today encompass the United Arab Emirates were Islamized early, beginning during the life of the Prophet Muhammad. Since then, the region existed under mostly constant Islamic rule of one form or another. Notable exceptions include periods of Portuguese and British incursion and colonization.
The current constitution dates from 1971, when the region gained its independence from Britain and the formal entity of the United Arab Emirates was established. This founding document ensured that the region and its politics would retain their historical Islamic character and legacy, establishing Islam as the state religion and Islamic religious law as the main source of legislation.
The current penal code punishes blasphemy against Islam's practices and doctrines specifically with fines and imprisonment, and the same punishment extends to blasphemy against recognized religious groups (there are separate provisions for both). The nation, being essentially theocratic, also long codified the death penalty for hudud crimes, which includes apostasy; however, in 2020, some moderating reforms were introduced, and apostasy is no longer explicitly/officially punishable by death.