The battle of Okinawa affected President Truman's decision to use the atomic bomb against Japan because, on one hand, Japan didn't want to surrender, even though the USA warned them that more destruction would continue after the battle by using the atomic bomb.
On the other hand, Truman knew that more than 2 million Japanese troops were waiting to fight. Therefore, after the Allies agreed, Truman decided to drop an atomic bomb on Japan (Hiroshima and Nagasaki).