The Cook Islands are as safe as the likes of Australia and New Zealand - just keep your wits about you, don't get yourself in any scrapes and you'll be fine.
There is a hospital on Rarotonga and a smaller one on Aitutaki, and there are some private medical centres on the smaller islands. Serious medical problems will require air evacuation to somewhere like Auckland in New Zealand though. Make sure your travel insurance covers you for evacuation!
In an emergency call 998.
The Cook Islands have a problem with ciguatera, a form of fish poisoning that affects reef fish. Symptoms of poisoning are upset stomach, faintness, fever.
Mosquitoes can be annoying in the Cook Islands, particularly during the rainy season from around mid-December to mid-April. Outbreaks of the mosquito-borne illness dengue fever occur from time to time so mosquito repellent is essential.
You can always check with the Foreign and Commonwealth Office to see the Cook Islands current health and safety measures.