Hang on...hang on....Ambiguity time!
My first reply was based on the assumption that the garage had merely fitted a headlight which was "not legal in this country". However, o8sp, are you saying that the garage replaced like for like? i.e. the one removed was identical to the one they replaced it with?
Because, if so, then you would have had a duty in the first place to inform them of the illegality of the one which they were replacing. In other words, unless they were so informed, then they had every right to replace the initial headlight with an identical one. What's your answer?
However, if the one taken out and replaced was itself legal on British roads, and the garage replaced it with one which was not, then my initial answer stands.