Latches are used to hold data temporarily. They're an essential building block of chips and they they were used to simplify interfacing between the CPU and other hardware as CPUs had data registers that couldn't hold a full address (for example 8 bit data registers vs 16 bit addresses for the 6502)
In software terminology (in computer / game console interfaces), it refers to a very common setup I'll try to explain.
Let's suppose you need to write a 16 bit address to a video register with the 6502:
lda #address&255
sta VIDEOREGISTER
lda #address/256
sta VIDEOREGISTER + 1
how would the hardware know when the address is complete?
it needs a trigger to make a copy of the value; for example when VIDEOREGISTER + 1 is written.
To simplify the logic, it uses a latch:
lda #address&255
sta VIDEOREGISTER
lda #address/256
sta VIDEOREGISTER
The first write stores the first value, the second write get the second part and triggers the operation.
It is smaller to implement in hardware that way since it is essentially two set (8 bits each) of flip-flops chained with one another (like a shift register). Each write triggers the copy of flip-flop1 to flip-flop2 and the value written goes to flip-flop1. One the second write, you have both values needed "latched".
In this scenario, when you read the status register, it resets the cycle; so if one write was already done, it's gone, and the latch is ready to receive an address through 2 writes.
This is useful since you don't know the status of the hardware after a reset, where maybe the cpu did one write before and then all writes to that register would subsequently not work as expected.