Banglok is supposed to be a fairly safe city to travel to but there are exceptions to the rule as with most all things. It really depends on how you are traveling. If you are a female traveling alone, you will want to take care in the city by yourself at night. Really, no city is safe at night for a lone female and Bangkok is no exception. If you are taking a taxi that you know nothing about, that's not very safe either. Going to the clubs, even the beach parties, is not really the safest thing you can do.
But, if you are wise, do your research and especially if you travel in a group and stay in safe hotesl, go out at night only in well populated, well lit areas, then your trip to Bangkok should be as safe as anywhere else you might go. Sure, random things happen even in the safest towns on earth but being wise and being careful will go a long, long way in keeping you safe.