The short answer
Yes, but not in the way most people picture. Cyprus was not a battleground, and it was not invaded during the war. It was, however, a British colony and a useful base for Allied operations in the eastern Mediterranean. Cypriot men also took part in the war effort, mostly in support roles.
Why the island was never a battlefield
Cyprus was far from the main fighting in Western Europe, and the Axis powers did not mount a ground invasion of the island. Its value to Britain lay mainly in its location, its airfields, its ports and its stores. Those assets supported operations in North Africa and the Middle East, rather than fighting taking place on the island itself.
Air raids and military installations
Axis aircraft raided the island at times, and airfields and ports were among the targets. These raids caused damage, but they were limited compared with the bombing of major European cities. They did not change the island’s overall role in the war.
Cypriot men in British service
Many Cypriot men served in labor, transport and engineering units, often outside the island. Some served in local defense roles. General accounts can only sketch this service, so if you are trying to confirm the record of a particular person, official service records will give a more reliable answer than a summary.
Why the military presence came later
Britain’s military presence on the island today does not date from the war. It stems from the agreements made when Cyprus became independent in 1960. Readers who want to know about that later role can read about why is the British Army still in Cyprus, which covers the base areas and the reasons Britain kept them.