In the context of a school visit to a science museum, both words are possible. Neither would violate any grammar rules, but excursion may sound a little unnatural and forced.
Bobby's class is taking a trip to the science museum on Friday.
Bobby's class is taking an excursion to the science museum on Friday.
In my mind, the first sentence sounds more natural – possibly because, in schools, such events are often called field trips. Plus, excusion simply seems like too fancy a word to use for an ordinary field trip.
However, let's say I volunteer to be a chaperone on the trip, and I'm talking to a coworker about it the following Monday. I might say:
I chaperoned Bobby's field trip to the museum last Friday. It was a nice little trip.
I chaperoned Bobby's field trip to the museum last Friday. It was a nice little excursion.
In this case, I like the second one better. For one, it avoids reusing the word "trip" (by the way, such repetition isn't always bad, although it can play a factor in word selection). More importantly, though, excursion seems to fit better in the context of "nice little" – particularly if I'm trying to emphasize that part of my enjoyment stemmed from the fact that I got out of my workplace for a day.
In short, when choosing between two synonyms, context often plays a major part in choosing which word to use. Oftentimes, the simpler, more common word is the better one to use, because the fancier word sounds pretentious or unnatural. However, at other times, the synonym might carry some small nuance that makes it a better choice. Going back to the comment you made, excursion might also be a better word if the class is taking a four-day trip to the national capital. In that case trip seems like too ordinary a word for such an elaborate undertaking – one that involves hotel stays and multiple destinations.
Avoid using less common words like excursion just for the sake of sounding erudite. As often than not, such efforts will backfire. Only time and experience can help you decide if a fancy synonym would improve your sentence, or seem like an unnatual force-fit.