How to communicate with the co-authors regarding the work (paper)
Co-authors should be involved in every step of the scientific progress. Some might be more involved in some steps than others, due to differences in expertise or involvement, but generally:


you should meet and discuss ideas and plans
you should meet and discuss results/interpretations
you should both contribute to writing


"meet and discuss" can be via email or in person, or a combination of both. These can be scheduled meetings or meetings at the coffee machine. Discussions can be more or less deep, depending on your needs and expertise (e.g. whether you need to share code or not is a specific question for your case, hard to answer in general - however, do ask for their input in case you want to). Writing usually loads heavily on one person (probably you), with the other(s) giving comments and feedback at major milestones.

You should definitely share and discuss progress before writing the paper, and before having written the paper. If you collaborator (as it seems) is not your supervisor, it is probably going to be your role to keep the project running. At the same time, if this person is not your supervisor, or you are already a bit more senior, you might not want to share every minor step of your work. Even if you can work quite independently, it could be good to give a status report every few weeks to keep them informed of the progress, and keep them on board. And, most importantly, to give them an opportunity to contribute.