The deployment of vehicular ad hoc network (VANET) is crucial to the development of autonomous vehicles. Radio frequency (RF) technology has been employed to transmit messages between vehicles and infrastructure in VANET. However, the limited RF bands may cause interference when vehicles transmit messages in a high-density environment. Moreover, when numerous vehicles transmit messages to the infrastructure at the same time, the simultaneous transmissions may cause channel congestion. While the issue of signal interference can be solved by the techniques of Visible Light Communication (VLC), vehicle clustering can be employed to improve the transmission performance of vehicles. VLC is an emerging technology with the advantage of immunity to electromagnetic interference. The technique of vehicle clustering categorizes vehicles into different sets, where each set has a leader for intra-cluster messaging. In this work, we present a clustering algorithm for VANET based on VLC. Our algorithm estimates the positions of vehicles based on their current movements. Then, it selects cluster heads based on the number of neighboring vehicles and generates clusters. We evaluate the performance of our scheme for both urban and highway scenarios. The simulation results show that the proposed algorithm can minimize the number of clusters and improve the transmission data rate for vehicles.