It is the same as vacillate in the formal sense, I just don't know how it ended up as a synonym of having a fun time. I think its because when you are vacillating you are like leaving things for later, enjoy the moment, that sort of thing. Like procrastination. But although "vacilar" is by definition tied to doubt or hesitation, I am sure most people that use it to mean "have fun" don't know about this because they learned it from somebody who used it to mean "have fun" so its directly associated with that. Maybe in some or most countries that word is really used to mean hesitate or doubt but I am not sure which. I know in Cuba they don't lol. And I dont recall somebody actually using it to mean anything other than the have fun thing
That word is most frequently used in the following kind of sentences/ways:
Voy a vacilar con la jeva (I am going to have fun with my girl)
Tremendo vacilon! (What a blast!)
Theres yet another slightly different way it can be used. A girl might say to a guy: "Te vi vacilandome las nalgas" (I saw you looking at my butt). Notice that here, vacilar is not used to mean the act of looking but the act of having fun while looking.
Here in Miami theres a very popular morning radio show called "El Vacilon de la Mañana"(like The Morning Blast or something like that)
Its funny how one takes their native language for granted and how difficult it is to translate that sort of cultural richness a word has acquired haha.