How can Wi-Fi bend through windows or penetrate walls? Browsing on Wi-Fi, I can access stuff in my room even though my Wi-Fi has to go through a wall to reach me.
But how is this possible, when the Wi-Fi wavelength is 12 cm, as cited here?
AFAIK, for light, or any form of electromagnetic wave, to "bend" around walls, the wavelength must be bigger than the window size. So how can Wi-Fi bend around windows? And how can it penetrate walls?
As a broader question, when can electromagnetic waves penetrate and not penetrate walls?
The question is different from
If both radio waves and gamma rays can travel through walls.
That question already presumes that radio waves and gamma rays can travel through walls. 
I do not know whether light can "bend" or penetrate walls. Also, I question Wi-Fi signals, which I believe are in the infrared spectrum only.
 A: The "bending" you are talking about is diffraction, and while 12cm wavelength is just about right to diffract around most everyday objects in your house, that is not the main propagation effect. Instead, there are two others. Most indoor stuff separating and thrown around in the spaces are either low permittivity dielectric stuff, such as bricks, gypsum, wood, etc., or metal posts, grill, railing, plates, etc. The dielectric stuff is usually dry and quite transparent at the lower microwave frequencies; there is some reflection at the interface but usually not much absorption. The metal stuff acts as an almost completely lossless mirror (check the grill in your microwave oven, its holes are much smaller than 12cm - the same wavelength as ~2.5GHz, but it is nearly a perfect mirror for that).
So to your specific question, there is no substantial diffraction as the microwave passes through the window, it does get a bit reflected from the pane and the frame, but mostly just passes through, same for the walls. Most of the problem of indoor propagation is in fact with the reflected waves that arrive almost simultaneously and with nearly the same amplitude as the primary through-wave (buzzword: Line of sight or LOS wave). Being coherent (i.e., same frequency and phase) these may interfere destructively, so the receiver may move to one particular location and instantly nothing. The instant is also important since the environment is not static, but rather changing.
For a building with reinforced concrete walls, if the wavelength is on the order of the separation of the steel bars, the EM wave with E-field polarization parallel with the bars will reflect instead of penetrating into the building. This effect is more common around 900MHz (another ISM and mobile phones) and 150-450MHz (mobile radio band).
