Might depend on the medication and situation. I take Glipizide once in the morning with all the other meds and then I am supposed to take one 30 minutes before I eat dinner. I have found that the timing really does impact the meal. If I forget and take it while I am eating, or just before it doesn't seem to help as much as I would like. I've learned to keep some in the car to take on the way home if I am coming home to a dinner. My drive home is about 25 minutes. ;)
With Metformin its fine to take with your meal. As for others check with your doctor.