They both have same functions apart from a couple of minor differences, some of those relating to politics. I will not list down the functions supposing that you are familiar with targeting pods.
Lets starts with political reason first, ATFLIR was designed for the F-18's initially but US Navy/USMC started equipping F-18 A+/C/D and Harrier AV-8B with Litening pods, even when ATFLIR pods had been ordered already. When ATFLIR pods arrived, they installed them on F-18 E/F SH. Now the debate is to convert all F-18's (basically all F-18 C/D's) to ATFLIR for commonality of system. There are of course two lobbies; one says that Litening is inducted on all F-18's so should be installed now on all F-18 E/F's, while other says that ATFLIR was originally intended for all F-18's so strip F-18 A+/C/D's from Litening and install ATFLIR instead just like F-18 E/F.
Technically, Litening doesn't take up a hard point while ATFLIR takes up an AMRAAM hard point under fuselage for F-18's.There are claims that ATFLIR's performance (resolution) is better than Litening Pod, but it could be debatable since i reckon that F-18 E/F's sensors, data bus and radar are better than F-18 C/D's so maybe these components could affect the performance of the targeting pod also.
Cost wise, Litening is cheaper, ATFLIR is expensive. Litening is used by USAF, USN, USMC and lots of other air forces, while ATFLIR has fewer customers.