I wanted to comment on @Ana answer but I don't have the reputation. I wanted to add to her answer by adding that if you are doing a literature review on this topic the terms target-locked, stimulus-locked and cue-locked are often used interchangeably. Example of components that are extracted from this form of locking is the N2 and P3. Whereas the two most common response-locked ERP components are the ERN (Gehring et al 1993) and Pe.
I also wanted to add that the majority of EEG systems (such as the dense array electroencephalographs from EGI) will take very precise measurements on when the stimulus is presented. Ergo, depending on the component you are trying to evaluate you will lock to either the stimulus or the response.
As an aside several factors are taken into consideration such as the time difference between computers and the lag from when the computer sends the signal to present the stimulus vs when it is actually presented. Having done this myself, when When these programs get out of sync it can be an absolute nightmare to find the source of the minute error.
Sorry if this answer is a bit long-winded. Hope it helps someone!