Hitchhiking is usually very safe. The most encountered feelings of unsafety are probably concerning the driver's driving style.
It is preferable to choose your drivers, i.e. to be at a gas station and to ask only the people with whom you would feel okay.
Keep stuff like money, phone, passport on your body, so that you still have that if you need to "abandon" the vehicle. Try to keep your bags close to you as well.
For women it might be a bit more risky. It is a good idea to get yourself some pepper spray, just in case.