Determining the salvation of others is always a tricky business. The two men you bring up certainly have an uncertain testimony. The scripture may not be completely clear as to their final abode. However, I have reasons for believing that both them were saved. I will explain briefly.
Saul was certainly rejected by God. The Spirit of God that had guided him (1 Samuel 11:6) departed from him when he rebelled against God (1 Samuel 16:14). God refused to speak to Saul by any of the accepted methods (1 Samuel 28:6). However, an incident that occurred when Saul approached the witch of Endor has convinced me that he was probably saved. The witch was frightened when Samuel came up (1 Samuel 28:11-14). He was obviously not the familiar spirit she was used to receiving. The Bible text calls him Samuel (v.12, 15). Certainly, this was an actual appearance by Samuel. Notice a verse from what Samuel told Saul:
1 Samuel 28:19 Moreover the LORD will also deliver Israel with thee into the hand of the Philistines: and to morrow shalt thou and thy sons be with me: the LORD also shall deliver the host of Israel into the hand of the Philistines.
Saul and his sons will be with Samuel by the next day. Samuel was evidently in Abraham's bosom (as was Lazarus in Luke 16:22-23). Everything about Jonathan, one of Saul's sons, points to him being saved. Samuel states that Saul and his sons would be with him--that is, where Samuel was. I do not think this would be possible if Saul went to hell. By the way, I realize that many will think that Samuel is simply referring to the place of the dead. That is a possibility, but I still do not think it makes as much sense. The phrase "with me" is just too strong.
Solomon also got himself into deep trouble with God. However, I think he was probably saved. Instead of a long argument, let me give just one verse:
Nehemiah 13:26 Did not Solomon king of Israel sin by these things? yet among many nations was there no king like him, who was beloved of his God, and God made him king over all Israel: nevertheless even him did outlandish women cause to sin.
This verse recognizes the sin of Solomon while at the same time declaring him "beloved of his God." I just do not see how this statement could be made of a lost man.
Just remember, these men lived before the universal indwelling of the Holy Spirit. They could lose the Spirit without losing their salvation. They were simply required to die "in faith" (Hebrews 11:13). Though I accept that I could be wrong on this, I believe they both are saved.