Most builders set the window unit in a bed of caulk as its installed. That forms an essential weather barrier. Air sealing occurs on the inside, and is easiest when you wait until the latest possible stage of construction. In windows with drywall returns, run a bead of sealant between the drywall and window frame. Run another bead under the sill, sealing it to the drywall. (Windows with wood frames are treated like doors.)