I basically just went with what I weighed when in great shape minus a few kilos. I started fighting at welterweight (67 kilos/147 lbs), and I think I was about 69 kilos before my first fight, with very littlel body fat, but as a 17 year old I quickly grew into 72 kilos and cut as much as 5 kilos before a fight, which was a bit too much given that in the amateurs weigh ins are in the morning and then you fight at night on the same day - or as early as the afternoon. I once weighed 72 kilos on Thursday night and weighed in at 66.8 on Saturday morning. And that was one of the few fights I lost. So I had to move up to light middleweight (71 kilos), and I then ate a little extra (I actually bought weight gain powders haha - I remember one of them was DAMN tasty) to put on some more weight as I didn't want to be small for my weight class.
I ended my career as a light heavyweight, where I'd be 84-85 in fighting shape and cutting to 81 kilos the week of the fight / tournament. I got a bit out of shape at times because of hand injuries that prevented me from training properly (and getting lazy and not even running, but sitting around playing music etc instead) and at one point I weighed as much as 93 kilos, which was shocking at the time, but then when I got back into training that extra weight came off as if by itself and I made weight easily for my last couple of fights, before hanging up the gloves and calling it a day while still in my mid twenties. No way in hell would I have fought at heavyweight, as I really didn't have the frame for that.
For a boxer, I don't think it's that complicated to find your ideal fighting weight. While in recent decades it has become more and more common to lift weights in order to deliberately put on extra muscle tissue, most guys probably do like I did and just fight a little bit below the weight where they feel their at their best. Some guys stretch it a bit more to gain an advantage, but then you have fighters like Julian Jackson, pound for pound one of the hardest hitters in history, who never really cut weight at all. MMA being a more complex sport, however, necessitates thinking about what you're strengths are, whether you're a grappler or a striker, whether it might be beneficial to carry more muscle tissue and so on. MMA fighters also cut more weight than most boxers, obviously.