There are basically two ways to make a pinhole camera sharper. as Olin Lathrop said, the smaller the pinhole the sharper the image, but if it gets too small, diffraction come into play. There is an optimal diameter of the pinhole and this formula calculates it:
Diameter = Constant x sqrt(Focal Length x Wavelength of light)
There is a bit of mess about what the value of Constant should be. If you're interested, this answer summaries the issue nicely.
The other factor is how round the hole is. Perfectly round holes will give the best results. You can even order laser drilled holes online.
You can also use bigger film, but I guess it's not very useful since you probably need a bigger camera too.
I've not suggested using a lens because as I've read in a comment you are interested in maintaining very long exposures and adding a lens will dramatically shorten the exposure time.