Tidal disruption events in the ultraviolet and optical