Leo decides to follow Stargirl instead of just talk to her because he is ridiculously shy; he is afraid of her, the way she makes him feel, and the teasing he will get from his schoolmates if he does actually instigate a conversation with her.
Leo actually follows Stargirl twice before he starts going out with her. The first time is in Chapter 3, soon after she arrives at Mica High. Leo does not know what to make of Stargirl. He is intrigued by her, but she makes him uncomfortable, because she is like no one he has ever known. He says that "the feeling (he has)...when (he sees) her...(is) something like panic". Leo is actually drawn to Stargirl; you might say, he kind of likes her. In this sense, he is experiencing the normal shyness and embarrassment a teenager might feel talking to someone to whom he is a little infatuated with for the first time. But Leo also doesn't like to call attention to himself. He likes to blend in with the crowd, and he knows that if he talks to Stargirl, the other kids will make a big deal about it. Leo is curious about Stargirl, so he follows her, but he doesn't have the nerve to actually talk to her.
The second time Leo follows Stargirl is in Chapter 16. This time, Leo knows that Stargirl likes him, because she has given him a special card in school. Leo, excited and shy, is actually "thrilled", but obviously woefully inexperienced. He is still afraid to talk to her, he is "nervous, afraid...more comfortable with her as history than as person". Giddy with the knowledge that "Stargirl Caraway...likes me", he finds her house, happy just to see it, then, when she comes out the door, he ludicrously "dive(s) behind the car in the driveway" so she doesn't see him". Stargirl knows he is there, however, and that he is following him once again as she walks into the desert. This time, Stargirl acknowledges that she knows he is following her - she actually knew he was following her the first time but didn't say anything - and breaks the ice, instigating a conversation whereby he can communicate with her without actually letting himself be seen. Leo is afraid of his own feelings for Stargirl, which are new and exciting for him, but Stargirl, with her uncanny perceptiveness, allows him to get used to her by being assertive but unthreatening, allowing him to keep the distance that he needs to feel comfortable with her.