I think there are some general guidelines but it mostly comes down to what you have and the role a player can handle.
Leadoff... ideally you have a high OBP with speed. Preferably someone who is patient and takes lots of pitches. You want him on base and able to move around the bases quickly. Should probably lead team in Runs.
3rd - Someone with power and ability to drive the ball. A high BA who may or may not hit lots of HRs. Lots of doubles. Speed is optional. Likely leads team in RBI.
4th - Cleanup. Usually the guy who has power. HR power. He protects the #3 guy. Probably leads team in HRs.
5th - often overlooked. You want someone to protect your #4 guy and make the other team "pay" for pitching around your #4. Can be a mix of power and avg.
Some guys can't handle the pressure of hitting 1-3. Working the count and getting pitches to see how the Pitcher is approaching the game. Some pitchers need a few pitches to settle in. Some hitters need to see a few ABs to adjust to a pitcher.
These days with video and analytics, it is probably less important at the MLB level. Players have seem each other so there is some familiarity.
In high NCAA, you may never see a pitcher multiple times.
High School you are probably seeing every pitcher once.