For weatherization purposes, is it worth removing the trim around windows (and sliding doors, etc) and filling the gaps behind the trim with spray foam (or perhaps caulk?), or is it acceptable simply to caulk around the trim?
Adding expanding foam around windows and doors is a cheap way to add insulation. If you're willing to do the extra work involved in removing and reinstalling the trim, it's definitely worth doing.
Adding caulk alone might stop drafts but isn't as good of a thermal break.
Make sure you use an expanding foam that is specifically for windows and doors. This product will not expand as much in order to prevent malforming the frame.