There are many possible causes:
Are you sure the blood wasn't coming from her? She may have had an early period.
It is possible for a man to rip his frenulum (the bit of skin on the under-side between the middle of the head and the shaft) during sex especially if he hasn't been sexually active for very long. Bleeding can also be caused by little tears on the penis or in the vagina.
There are several STDs which can cause bleeding during sex.
It can be a sign of kidney stones or urinary tract infection.
I suggest you both go to a doctor or GUM clinic. Use a condom as STDs are even more likely to be transmitted if there's blood present.