I had a situation with a client who had someone coming into her home repeatedly through the same wooden-frame window and stealing a few silver items at a time, which went unnoticed for a while. In this case, the window was in her laundry room and was easy to access from the outside while being concealed. She asked me to fix it so the window couldn’t be opened. So, I carefully drilled a hole through the top of the bottom sash that continued through to the bottom of the top sash and installed a simple dowel pin to keep either sash from moving. Problem solved.
This is not the only reason that people do this. Sometimes, if the house is older and the windows are low to the floor, they may want to make sure a toddler can’t open the window easily. In this case, a screw might be the best answer, but I think a tightly placed dowel is still the best solution.
I have seen people do like above, and screw the windows together. This is a bad idea for several reasons. First, the screw can be really difficult to remove in case of a fire where the only exit point is that window. Second, if you’re a landlord and something terrible does happen, the insurance claim might not get paid, criminal charges could be filed, etc. Third, you can’t make it look nice. At least with a dowel, you can fit the size of the hole, paint the dowel end and make it look halfway decent. You could even put a fancy wooden knob on the end to make it look like it was meant to be there.
In addition, if you’re thinking about doing this, search for some other options that may fit your application better. I’m not actually advocating that anyone do this (and it only works on wooden windows), but it was a solution we used that worked.