Soreness and bruising in the toes is not unusual for runners, especially if you are training for a long race or have recently amped up your mileage. When you run, your feet slide forward in your shoes and more blood flow is sent to the feet and toes. Over time, fluid can build up under the nail.
There are ways you can alleviate the pain of sore times and attempt to prevent the condition, but you might not be able to completely avoid it. See your doctor if you are concerned about the soreness or if it persists.
Evaluate whether your running shoes are too tight. According to Road Runner Sports, your running shoes should be slightly bigger than the other shoes you wear. As you run, your feet begin to swell. If you don't have extra room, your toes will start to hit against the front of your shoe, injuring them.
Have your gait evaluated by an exercise physiologist. I you have recently switched your stride from heel striking to mid-foot or forefoot striking, you might be experiencing sore feet and toes. Even if you have not switched your gait, a physiologist might be able to instruct you on how to land so as not to put so much stress on your toes.
Switch your socks. Those that are too thick or too small can cause sore toes, because it increases pressure on your toes and produces an impact or friction problem. Try buying a different brand or material of sock, ensuring that it's a moisture-wicking variety to keep your feet dry.
Trim your toenails. If your nails are too long, they are at more risk for being banged against the front of the toe box of your shoe.