yes it can. if, however, the location is way off...say like...a few hundred miles it is possible that the particular wifi network you are logged onto has a proxy, meaning it redirects all connections through a third computer, making the location inaccurate.
short version: it will locate your rough location on nearly all wifi hotspots. its not iphone-accurate, but it's close enough to get you within a block or two.