Focusing in the dark can be a tricky task... and it can certainly be frustrating to go to all the effort of shooting at night only to get home and find that the scene wasn't quite in-focus. When it comes to focusing at night, there are a few options that work better than others.
Option #1 - Hard Stop At Infinity
I really like it when I'm using a lens that has a hard stop on the focus ring at infinity. This allows me to more easily set the focus on infinity which works really well in most cases. In-fact, this approach is so easy that I use it whenever I'm using a lens that allows it. Some of my lenses however, have the ability to focus past infinity which complicates the process. Back to the simple approach, I just make sure I know which way to turn the focus ring before I get out into the dark and then use just turn the ring all the way in the correct direction. I've heard of some people taping the focus ring (with gaffers tape) but I don't typically do that.
All that said, I suggest you do some testing on this approach before you go back out in the field for night photography - just to get to know your lenses even better. This can help you with your familiarity and can help to identify where a lens may behave different than you'd expect. It's good for example, to see if the infinity marker really is the best maker to focus the distant objects. Testing can help to do all this without wasting critical images that really count. I suggest trying to manually focus with your lenses near your home (day first and then night) just so you can get a feel for manually focusing to get the sharpest images possible.
Option #2 - LiveView
When using a lens that can focus beyond infinity or when I just want to have more control, I look at the next option, using LiveView. This approach only works when there are significant points of light that are visible in the distance but that works in about 90% of the cases where I shoot. There are a couple of keys to keep in mind though. Don't limit yourself to finding points of light in your chosen composition. If necessary, turn the camera around just to focus on the moon or the brightest star or whatever's available and then return to the correct direction for your planned comp. Because of this technique, I recommend a "focus first" approach where I set the focus before the composition - to avoid having to recompose your shot. This approach works well in cases where there is no hard-stop on the focus ring or where your chosen focus point is closer than infinity. In general, it gives a lot of flexibility - making the live view screen my favorite tool for focusing on a subject.
A couple of additional suggestions... To help with this process, try pre-focusing your focus ring before using live view to get it close and make it easier to spot the points of light in live view. In addition, I've found that shooting "wide open" with iso topped out and aperture wide open can add significantly to the detail you see in live view. This approach works well in showing more detail and helping to make LiveView more usable at night. If you do this, just be sure to return your settings to where you want them after you're done setting your focus. At times to get a star to appear, I've head to be a bit creative though. I'm talking about times where it's so dark that no bright stars or lights appear anywhere in view - just stars that seem like they're too dark to appear. But when I zoom in one step and then look around (in LiveView), I'm able to find one. The point is it that it can still take a little effort if you're using LiveView to find stars.
Option #3 - LiveView With Illumination using a Green Laser Pointer from O-Like
This uses a variation on the LiveView approach (option #2) - only with a little help from an artificial light source. I've seen cases where a foreground subject can be illuminated using a flashlight or some other light source. In cases where the subject is further away, I've seen success by placing a flashlight (still on) near the subject and then returning to focus on it using live view. In a further refinement (that works really well), I use a small laser beam pointer that illuminates a point directly on the object you want to focus on. In rare cases where I just don't have any points of light to focus on, I just whip out my little green laser beam pointer and set it down so that it's pointed at the object I want to focus on and then I use live view to set focus.
I came up with this idea after doing some research on the astronomy side. And with a green 50mw pointer, I've found that even if I'm trying to focus on a mountain a few miles away, this approach seems to work well - so far in my testing anyway. Of course, I find it more useful when focusing on a foreground subject that's significantly closer than infinity. The laser pointer shown in the image is the one I purchased from O-like and it has served me well. I got it from:
I often use a technique where I blend between two exposures - one focused on the stars and another focused on my foreground. When my foreground is far enough away, there's no need for this approach, but when I want a foreground that's closer than my lens can handle together (in the same shot) with distant objects that are also kept in-focus, I often resort to multiple exposures to get what I want. That makes these focusing techniques a key part of my strategy.