For example if a medication has sedating effects (such as some antidepressants) it may be advised to be taken before bed so this side effect is turned into something generally beneficial (more sleep) and less prevalent during waking hours).
Statins (cholesterol lowering medications) are usually prescribed at night time as this is when your cholesterol catabolism is most active.
Pain relief is often varied around sleep schedules
Insulin is scheduled around meals and sleep
Etc etc.