For example I'm working on one site now where a modal lets you sign in (which involves selecting from or searching through a long list of third parties) and if it wasn't a modal it would have to take you to a new page which would be a poor UX.
So long as they're not used for those awful "sign up for our mailing list" purposes, have been set up to work well on all browsers and viewport sizes, and are accessible, I think they can be okay.