Drug induced photosensitivity (DIP) refers to the development of a cutaneous disease in response to the drug chemical in combination with light. Only the drug or light alone cannot cause the reaction and both are required to be present together. The underlying pathophysiology is important clinically to identify the type of cutaneous manifestation the drug-light combo has caused. There are majorly two types of reactions, phototoxic and photoallergic reactions.
Also, the kind of light required depends on the kind of drug and the the wavelength at which it gets photoexcited. Although UV-B is a mojor cause of sunburn, the wavelength required for DIP for most drugs falls in the UV-A part of the spectrum.
Phototoxic damage refers to the direct damage the photoactivated drug can cause to the tissue. Light leads to excitation of electrons and as they return, they can lead to formation of reactive oxygen species which damage the cell membranes and DNA. This tissue damage leads to activation of proinflammatory cell signal transduction pathways and leads to inflammation in the area. Clinically, it looks like an exaggerated sun burn.
This is similar to the same old hapten story. A drug which is otherwise non-antigenic turns antigenic after a photoreaction. Most probably, the reaction should have caused the modified drug to bind to cutaneous proteins leading to cell mediated immune reaction. This T-cell mediated inflammatory response usually has an eczematous morphology if the photoallergen is applied topically or the characteristics of a drug eruption if the photoallergen is administered systemically
It is important to differentiate the kind of reaction, a drug would cause.For example, the tetracyclines that you mention are phototoxic but not photoallergic. Photoallergic reactions have far lesser incidence than phototoxic ones.
Coming to the other part of your question, on the treatment, most important is to educate your patient for appropriate photoprotection. If severe, the drug could be withdrawn and switched to a safer one. Treatment includes topical corticosteroids to bring down the inflammation in either reactions. Oral antihistaminics are reported to have limited advantage. Why this is so,I'm afraid, I do not know. Hence your question remains partly answered.