European countries could colonize many countries mainly because they were more advanced militarily, with large armies and many weapons. Many civilizations were more advanced than Europe agriculturally, technologically, etc. while Europe was more advanced militarily. Why is that?
What do you mean by more advanced?
If we're talking about manpower, well, European colonizers rarely, if ever, deployed large armies for colonial campaigns. Most manpower of colonial armies came in the form of locally raised troops, local allies (ex. Mexico, pro-British Indian princes, Christian daimyos), etc.
If we're talking about sheer amount of weapons, well, China had developed gunpowder first, and had come up with a numerous amount of ways to kill people using it (Needham includes, among other things, chemical weapons, automatic crossbows, multiple rocket launch systems, among other things). Even in 1700, during the Mysore-British war, the British were surprised by the use of Indian rockets, such that they captured them and reconfigured them for their own use (see the Congreve Rocket). Ever heard "the rockets bursting in air" in the US anthem? Those were Congreves.
So, not quite sure what you mean by "more advanced militarily."