As the process of urbanization continues to accelerate, the demand for sustainable cities has become more critical than ever before. The incorporation of electric vehicles (EVs) is a key component in creating sustainable cities. However, the development of smart cities for EVs entails more than just the installation of charging stations. Software engineering plays a crucial role in realizing smart cities for electric vehicles. This paper examines the role of software engineering in the creation of smart cities for electric vehicles, the techniques utilized in electric vehicle charging infrastructure, the obstacles faced by software engineers, and the future of software engineering in sustainable cities. Specifically, the paper explores the significance of software engineering in integrating EVs into the transportation system, including the design of smart charging and energy management systems, and the establishment of intelligent transportation systems. Additionally, the paper offers case studies to demonstrate successful software engineering implementations for smart cities. Finally, the paper concludes with a discussion of the challenges that software engineers encounter in implementing intelligent transportation systems for EVs and provides future directions for software engineering in sustainable cities.