Is there an optimal thrust to weight ratio or does it not matter at all?
There are some limits:
- The thrust/weight ratio (TWR) has to be above 1 at liftoff.
- TWR has to be low enough to keep the acceleration below reasonable limits. Many rockets these days are designed so that the acceleration near the end of the first stage burn (when weight is lowest) is around 4G. Unmanned rockets can go a bit higher, but over 9G is rare for satellite launchers. Military missiles can use much higher accelerations.
- A high TWR means you build up lots of speed in the lower parts of the atmosphere, so you get lots of aerodynamic pressure and heating.
- A low TWR means it takes longer to reach orbital speed, so your gravity losses are higher.
In practice, TWR at liftoff is slightly over 1 for many orbital launchers.