Getting around by bike can be a great experience but you've got to keep safe. I've been commuting by bike for over twenty years with only one bad crash. Here are a few tips to help keep the rubber side down and avoid danger will commuting by bike.
You don't have the protective shell of a car around you so it's up to you to keep yourself safe. Pay attention to what's going on around you so you can anticipate any danger. If you see parked cars along the street ahead of you give them a wide berth so you don't get hit by someone opening their door. Keep an eye on the cars ahead of you so you can brake if someone makes a right turn in front of you.
Don't make lane changes without signaling. Hold your line down the road and avoid sudden direction changes. Drivers around you won't be expecting sudden changes so don't be erratic.
I can't tell you how many times I've seen people riding at night in dark clothing with no lights. These people have a death wish. Drivers can't avoid you and give you room if they can't see you. If you ride anytime near or after dark make sure you have a bright front light and red rear light. A couple of rear lights such as one on the bike and one on your helmet is even better. Wear bright colored clothing with reflective patches or leg bands. Anything that makes you easier to see just helps people avoid running you over.
Wear a helmet
I know some people don't like helmets but over the years they have saved by head serious injury. If it's your head versus the road, your head will lose.
Plan for bad weather
While fenders might not be cool on your carbon race bike, they add a level of comfort to your commuter that can't be over stated. When it's raining you can stay relatively dry if you aren't getting a constant spray from your tires. If your bike will take them a set of full wrap fenders even keep most of the water off your feet. Run a little more rugged tire with a puncture resistant layer in the casing to reduce flats and give you more grip in the wet. Save the light tires for your race bike.
Be prepared for mechanical problems
It's a good idea to carry a mini tool kit, spare inner tube, patch kit, pump and tire levers. Nothing slows you down like a flat you don't have the gear to fix. If something comes loose it's easy to tighten it up and keep riding but only if you have the tools with your. Plus it's a good idea to take a basic bike repair course so these repairs are being attempted for the first time at the side of the road.