Illustrator is compatible with various scripting languages (including Microsoft Visual Basic, AppleScript and ExtendScript). You can develop your own scripts and add them to the Scripts submenu in addition to using the basic scripts that come with Illustrator.
ExtendScript is de facto standard to Adobe Illustrator scripting and is used in most scripts everywhere, including in this site.
Here you find some resources if you want to try writing illustrator scripts for yourself.
Old, but still relevant scripting reference – very comprehensible and easy to navigate
Illustrator scripting guide by Adobe pdf – good for beginners
ExtendScript UI reference – an excellent book about arcane magic if you want to build an UI in illustrator or another Adobe’s product.
Amazing web based app to build UI for extend script