Highlighting the "British Muslim values", Cameron said: "This Ramadan, we've seen community spirit with inventive ways of breaking the fast with people of all faiths and none; from the Scouts' open-air iftar in Birmingham to the iftar on the Thames in London - from events in synagogues and churches to community centres, homes and even tents."
He also took the opportunity to draw attention to the growing dangers of terrorism at home and abroad.
Referring to ISIL and the territories it has occupied in Syria and Iraq, Cameron said: "We think about what life is like right now for people across the world for those in Syria and Iraq - families just like ours - suffering at the hands of ISIL and Bashar al-Assad."
He also remembered the victims of terrorism who lost their lives in attacks during the holy month of Ramadan.
Islam is the second largest religion in the UK and Muslims form nearly 4.5 per cent of the total population according to 2011 official census data.