It was originally developed at Netscape in 1993 and has gone through various iterations since and now is part of the ECMAScript, making it open and cross-platform.
Apart from being one of the most popular programming languages in the world and synonymous with developing websites and web apps, here are some reasons why it's important,
It's extremely flexible and easy and over the years many developers have written over the core language and increased its functionality exponentially. This has greatly helped create various apps, games, and API over web browsers creating dynamic and interactive web pages.
It is also widely used for creating various web applications which refers to apps running on your web browsers like Chrome or Firefox. Google Maps is the best example of a full-fledged web application.
It is also used in creating apps for phones and watches and to create various interactive games on the Web, computers, and phones!