Do fighters have black boxes?
Yes, most military aircraft, including fighter aircraft, are equipped with a "black box" called flight data recorder (FDR) / crash survivable memory unit (CSMU) / integrated monitoring and recording system (IMRS) / deployable flight incident recorder set (DFIRS).

Sources 1, ( B-1B, F-22, T-45, B-2, F-4, F-15, F-16, C-5 Galaxy, NATO AWACS, and the Space Shuttle)
2. (F-18, floating black box)