As you stated, 6-4 lesions form when DNA is exposed to UV radiation. These lesions result in a distortion of the double helix, in this case, a bend or kink of 44 degrees. Ultimately these lesions, if not repaired, can interfere with DNA transcription and replication. As you likely know, the effects of these lesions can be mitigated by repair mechanisms, such as the enzyme 6-4 photolyase and excision repair.
I am attaching a link to an excellent review article on UV-induced DNA damage and repair. Note that Figure 2 shows the chemistry of UV-induced 6-4 lesions and addresses your "how they form" question.