Where and when did the sport four square originate?
Four square in the modern meaning is a ball game/sport which has been played by young people, mainly in school settings, for many decades.
However, having said that, in Australia, the most prolific game during the 1950's, 1960's and 1970's, in many schools was the wall downball game [or now, "rebound handball"]; the game without a wall was also played, but it didn't become more popular until about the 1980's, as school buildings policy changed, and garden beds and walkways were placed around school walls (largely an outcome of the increasing feminization of education!). Many of the court only downball games used school seats, etc. as a type of 'net' between sides of the court - but such seating was also often dispensed with in favour of the 'updated' look. It seems that from there, "4-square" developed in order to play more than 2 sides in a game in school settings, as the game [via such name] had not generally existed in the 1970's. Often, despite its name, courts were made up with even 8 or more squares. Schools themselves, however, eventually assumed responsibility for the drawing ["painting"] up of courts ... and 4 squares have, thus, become the general standard.
It seems that it is highly popular in many countries worldwide.
In USA, there is an organization bold enough to claim that it runs the "World Championships" - mainly of its own 'locals', however!