Use useEffect when you want to perform side effects in your functional components, such as data fetching, subscriptions, or DOM manipulation.