Best time to exercise?

Is it best to exercise in the morning afternoon or night? And should you exercise before or after you eat?