Welcome to Healthcaremagic
Anytime is a good time to go to gym. If you go to gym in morning the you need to do the stretching exercises first so that you do not have injury
to fascia which wraps the muscles. In evening, because of the whole day activity, the fascia is stretched already. However in evening you should be fasting for 2 hours. More important is a schedule which you can follow regularly.