Consider Your Lifestyle
Your lifestyle will play a key role in deciding the best time of day to practice guitar. Are you a 21 year old who is more of a night owl, or are you in your 40's with a full time job and a family? Most likely if you are in the latter category, a midnight practice session will not be your best choice. On the other hand if you are up all night partying with your friends, you probably won't be focused and ready to go at 7am. Try to find the most consistent time each day when you usually have free time and your mental fatigue is fairly low.
Be Aware Of Your Energy Levels
Track your energy levels throughout your day. For example, a lot of people have a mid-afternoon slump, usually after lunch, when they feel a bit tired and mentally drained. This would not be a wise time to practice guitar because you will not be able to focus on what you are doing very well. Choose a time of day when you feel energized and alert. 10 minutes of laser focused practice is more productive than an hour of scatterbrained practice where you are just going through the motions while thinking about what you're going to have for dinner tonight.
Experiment With An Early Morning Practice Routine
I know this can be a difficult decision for a lot of people. Most of us are already sleep deprived and the thought of getting up even earlier is grim at best. All it takes is going to bed 30 minutes to an hour earlier. Think of it like an early morning exercise routine, but instead of exercising your muscles you are exercising your mind. A workout for your brain can be just as beneficial as a workout for your body and can give you more energy in the morning.
Experiment With A Practice Routine Right Before Bed
Sometimes practicing right before bedtime can actually make it harder to fall asleep because you are stimulating the brain when it is trying to shut itself down. One way to get around this is to practice a simple exercise that doesn't require that much mental energy. Use the exercise as a sort of meditation and try to focus on building muscle memory (playing without thinking). Play the exercise over and over until it becomes somewhat hypnotizing and focus on the physical sensations in your hands and fingers.