ID & Name locators will be used when there are unique identifiers & unique names available on the web page.
CSS Selector can be used for performance and when ID & Name locators are not unique.
XPath is used when there is no preferred locators.