Babylon.js is (working towards) being a batteries included game engine. Three.js is a rendering engine with a lot of first and third party plugins. Add the right plugins and you can probably do anything Babylon can, or use as is and you can make a lightweight landing page.
An analogy is an IDE vs VSCode. Pre-built vs lightweight and extensible.
Until recently, I think Three.js has been a better fit for the "web" paradigm where everything has to be lightweight and the main focus of 3d graphics is landing pages that need to load in 3s or so.
On the other hand, Babylon.js is also an amazing tool and I think the comparison to Three.js is a little unfair to both. They solve different problems in the 3D space, and both are great at what they do. A better comparison for Babylon.js is Playcanvas.
My wife did a lot of research into this when we picked an engine for our website and she found that the API of ThreeJS breaks backwards compatibility a lot, while Babylon is exactly the opposite. Babylon also has vastly superior documentation and doesn't seem to suffer from lag spikes as much. However, it's an oldschool API (did I mention they really value backwards compatibility?) and requires quite a bit of learning to get going. Also, it's three times the size of ThreeJS, so bandwidth optimization is absolutely required.