Ghana requires a yellow fever vaccination certificate for entry -- no exceptions. Get vaccinated at least ten days before travel and carry the certificate with you. It will be checked at the airport.
Malaria is the biggest health risk. Ghana is in a high-transmission zone and you should take anti-malarial medication (atovaquone-proguanil, doxycycline, or mefloquine -- consult your doctor). Use DEET-based insect repellent, sleep under treated mosquito nets, and wear long sleeves and trousers at dusk. Even with precautions, if you develop a fever during or after your trip, seek medical attention immediately and mention that you have been in a malaria zone.
Recommended vaccinations beyond yellow fever include hepatitis A and B, typhoid, meningitis (especially if visiting the north during the dry season), and rabies if you plan to spend time in rural areas. Make sure your routine vaccinations (tetanus, polio, measles) are up to date.
Water. Do not drink tap water. Bottled water is cheap and available everywhere. Sachet water ("pure water") sold in small plastic bags is the Ghanaian standard and is generally safe. Be cautious with ice in drinks outside of upscale restaurants.
Food safety. Street food and chop bar food is usually freshly cooked and safe. Use common sense: eat where locals eat, make sure food is served hot, and be cautious with salads and uncooked vegetables. Stomach upsets are common in the first few days as your system adjusts.
Medical facilities. Hospitals and clinics in Accra and Kumasi are adequate for basic treatment, but anything serious may require evacuation. Travel insurance with medical evacuation cover is strongly recommended. Pharmacies are well-stocked in cities; carry a basic first aid kit for rural travel.
Sun and heat. Ghana is close to the equator and the sun is intense. Drink plenty of water, use sunscreen, wear a hat, and take it easy during the hottest part of the day (noon to 3 pm). Heatstroke is a real risk, especially in the north.