When traveling to Kenya there are a few things you need to be aware of. Kenya is a patriarchal society. The man comes first and the women come last. Rape is not a crime in Kenya. If a women is raped she must have done something to provoke the man. Not all Kenyans feel this way but it is the general consensus. There may be a law on the books about rape, however it is not or very difficult to enforce.
Here are some ways to keep yourself safe in Kenya:
Clothing - I highly recommend skirts for women. You want your skirts to be at least knee length and of the gathered variety. You don't want a tight or snug fitting skirts or skirts with slits up to your thigh. Also, wear a slip. It is considered very sensual or erotic if a man can see the shape of your thighs. As for shirts, they should not be snug and have short or long sleeves. I don't recommend sleeveless tops. If you are in an urban area like Nairobi or Mombasa, shorts and trousers will do. However, you will find that you are treated better when you have a skirt on.
For men, trousers and shirts. Shirts can be short or long-sleeved. Shorts are fine for urban areas, but like the women you will find you are treated better when you dress as the Kenyan culture dresses.
Your Bags and Luggage - Keep your bags with you at all times. If you set your bag down don't put it near a window or door. It's very easy for someone to reach in and grab it. If you are on a train, you may want to consider sleeping with your bags and luggage. There can be a lot of crime on the trains. Also, keep your compartment locked.
Waistpacks - One of my friends was wearing a waistpack and she was robbed by three men. Two picked her up and the third unhooked her waistpack and ran off with it. You are better off using a backpack than a waistpack. Some people wore their backpacks on their front instead of their back. I wore mine on my back and put a lock on the zippers so thieves couldn't get into mine while I was walking.
Valuables - I'm sure you've heard this before. Leave your valuables home. Kenya is a third world country. A nice watch or camera will feed a family for quite a long time. If you do bring something expensive, like a camera, be sure to keep it packed near the bottom of your bag. That way a thief who tries to grab something out of your bag won't get the good stuff.
Hitchhiking - Last I knew hitchhiking was still safe in Kenya. However, as a female I recommend you don't hitchhike alone or at night. Hitchhike in pairs and accept rides from nice looking vehicles. If you don't like the look of a vehicle that has stopped to pick you up just say, "Oh, I'm sorry, I thought you were a matatu." A matatu is hired transportation see Riding in a Matatu.
Food - While sitting on a matatu be careful of food you accept from people. I heard stories about people putting drugs in the food sold where matatus pick up and drop off people. There is a white (chattel) slavery trade in Africa and if you are near the border there is a danger of drugged food. The rumor is that you could be drugged and sold into white (chattel) slavery. Is this true? I don't know. I heard the story from both Kenyans and U.S. Peace Corps volunteers. Your best bet is to only buy factory sealed food and drinks while you are in a matatu waiting for it to fill up.
Crime in Kenya is actually quite low and Kenya is definitely one of the safer African countries to visit. If you visit Kenya, you will have a good time and chances are you won't have any problems.