Simple questions, but there are a lot of variables that can change the answers.
How important is eating something before a shorter, but intense ride?
Assuming only a 1-2hr ride and an early morning start, probably not a big deal. If you're going hard the whole time, you may start to bonk after 70-90 minutes, but that also depends on dinner last night, how long you've been up, did you have caffeine this morning, yada, yada, yada... If you eat something before the ride, I'd recommend keeping it light with a focus on carbs & unsaturated fats (toast, bagel, oatmeal, cereal, nuts, muesli). Pre-ride fueling is more important for sustaining longer rides. Side note, some people will actively choose to do long, steady state morning rides in a fasted state. This is a very targeted training where they are driving for an adaptation triggering the body to improve use of onboard fat as fuel instead of available carbs..
Will eating something shortly after riding help with recovery?
YES! Especially if you're riding hard efforts. You have ~30-45 minutes of accelerated metabolism immediately after a workout. If you're hammering sprints or high power efforts, eating a mix of carbs, proteins, and unsaturated fats IMMEDIATELY after your ride will expedite nutrient delivery to the muscles you just taxed, resulting in increased recovery and reduced aches and recovery time. This is less important after a short, chill ride. But frankly, I always eat a little something after all of my rides, even short ones because I ride every day and want to minimize any impact to my ride tomorrow.
What do you recommend in terms of food?
Pre-ride (regardless of planned duration): Keep it light, carbs & unsaturated fats (toast, bagel, oatmeal, cereal, nuts, muesli). If I'm planning to do hard efforts, I'll go even lighter, maybe just a cereal abr.
Post-ride...
...<2hrs with hard efforts: carbs, proteins, unsaturated fats, and antioxidants. Rice, sweet potatoes, beans, meat, avocado, pomegranate juice, red fruits (raspberries, strawberries). Make sure to get a decent amount of protein as this will really help reduce muscle soreness.
...>2hrs with hard efforts: carbs, proteins, unsaturated fats, and antioxidants. Same as above, but increase the amount of carbs (rice, sweet potatoes, potatoes, bread, etc) proportionate to how long the ride was.
...<2hrs no hard efforts, chill or steady state: carbs, proteins, unsaturated fats, and antioxidants. All of these are good, but the carbs and unsaturated fats are the most valuable. A peanut butter sandwich with fresh raspberries in it is my go to in this situation.
...>2hrs no hard efforts, chill or state state: carbs, proteins, unsaturated fats, and antioxidants. Rice, sweet potatoes, beans, meat, avocado, pomegranate juice, red fruits (raspberries, strawberries). I lean heavy to the carbs and unsaturated fats, but I'll make sure to include protein after these rides as the endurance muscles were taxed.