Josh is right - both ways are fine. The codebehind files are there for your ease of development, this is the whole point behind user controls, too. If you would always deploy a compiled assembly, then you would develop custom controls. In this case Sitefinity only allows you to easily upload and register controls, the rest of the work is done by ASP.NET anyway.
For building modules you have two options. I don't know which one you're referring to - intra-site or pluggable - but the case is the same. With intra-site you upload user controls and code files, with pluggable - whole assemblies.
So I would recommend to do whatever is more comfortable for you.