The Vatican City does not shut down after a certain time, or lock visitors out, so you are free to walk around the square at any time. However, it is worth noting that all the Vatican museums and St. Peter's Basilica will not be accessible after nightfall, and you may be disappointed by this.