For a big city of more than 10 Million people, Bangkok is a relatively safe place. Violent crime, although far from unknown, is still somewhat rare. Muggings and other forms of direct confrontation are very 'un-Thai' and quite uncommon. A bigger crime problem is pick-pocketing in crowds. Always be aware of your belongings in crowded areas. Avoid fanny packs, which not only scream to the world that you're a tourist, but are also easy to cut and run with.
The most likely criminal behavior you will encounter in Bangkok is the old gem con. In busy shopping areas such as Silom or Siam, you may be approached by a well-dressed man who chats you up, claiming to work at a nearby hotel. Eventually, he will steer the conversation around to shopping, and an offer to take you somewhere with really good deals on gems, jewelry, or something similar. You may end up at a reputable looking shop, and you may end up buying something thinking you got a good deal, but what you end up with will in fact be worth a lot less than you have been led to believe. Needless to say, you need to be on your guard if approached on the street, and you should never agree to go anywhere shopping with any new friends you may meet on the street.
Bangkok has so far escaped the violence that has occurred in other heavily touristed areas in Southeast Asia, as well as the deep south of Thailand itself. Cursory security measures are in place at many western hotels and some shopping centers to screen cars entering the premises. So far, searches of people entering buildings is not done. As always, you would do well to be on your guard in crowded clubs and shopping areas. Be aware of which exits are close by, but there's no reason not to enjoy yourself.