In my thesis, can I use results for which a collaborator wrote most of the simulation code, or do I have to independently replicate the simulations? In the course of my PhD I have written a few papers that I am planning on incorporating into my dissertation. I was first author on these papers and legitimately wrote and developed the high majority of the papers (as in, I wasn't just gifted "first author" status). In the course of our papers, my co-authors and I used some computer simulations to verify our theoretical results. 

While I developed all of the theory for the paper independently, another graduate student did some of the grunt work writing the code for one of the simulations. This was done mainly just to expedite the submission of our paper, and not because I had no idea what was going on with the simulations. I actually helped develop the intricacies of the simulation; it just was not my hands on the keyboard coding it. Can I just cite our own paper in my dissertation and use its results as if they are my own, or do I need to independently replicate the results that my fellow grad student found in order to use them in my dissertation?   

The underlying question here comes down to how much I can "self-cite" as my own a part of a paper that I was the main author for, but did not explicitly produce? I am aware that citing a paper I wrote is fine. I am even okay copying wording directly for certain potions of the dissertation (with a note explaining the replication). However it is unclear if I can use results that someone else found as part of my dissertation. His results give application for the theoretical framework that I am establishing for my dissertation.
If those results are published, cite the publication. If those results are unpublished, you can cite the contribution of the other student either where you present the results ("Otherguy and Vladhagen, unpublished, 2015") or in an acknowledgment (I would favor the latter). Your advisor should be able to answer questions like this as you write your dissertation as well.

Note that in academic work, "writing code" is not held to the same level as intellectual input: it's good that you want you make sure your colleague gets appropriate credit, but it just isn't the same as developing ideas. The same would go for other "grunt work" in a lab: culturing the cells, washing the dishes, running the PCR. That type of credit goes in the "acknowledgments" section, or with some added intellectual work and help drafting the manuscript, they get a middle authorship. Science is a collaborative process, and no one expects your work in your dissertation to be yours and yours alone without anyone's help. 

If you want to distribute the code itself, you would want to have permission of the person writing the code.