There are two ways you can get variables to move across modules that I know of: tokens or databases.
With tokens, you give the PC an item to represent something (whether during the module or at the very end is up to you). In the second module, you check for this item and can then set a variable if you want to remove the item from the PC. Henchman in the OC use this system to determine whether you've hired them before and how far you've gotten in their quests (if you have their quest reward, the game knows you've finished their quest in the previous chapter.)
With databases, you use the campaign database functions to save variables. This uses the SetCampaign<Variable> functions and saves to a database in the databases folder of the player's game. The downside to this is that you can only have one database of a particular name at a time, so repeat plays can overwrite the old databases. SoU and HotU use the database system to move henchman equipment between modules and move some variables. One of the ways I've seen used to avoid the main pitfall of overwritten databases was used in the community module the HeX coda 01, where the player is able to save to one of three databases (the scripts involved alter which database is used). Another way would be to manually move the database files to another folder to backup the database, but that's a bit complicated for some players to keep track of.