Can staying up all night affect your vision?

It depends. For the most part, no. However, your general health is important for overall eye health and eye sight. Your eyes may feel dry after being up all night, and this may blur the vision. Good sleep is essential for optimal brain function.
Maybe. Your entire body will be tired, including your eyes. Many people get red eyes from decrease lubrication (tears). Difficulty in concentration and reading speed will also decrease. When tired your eyes can have trouble focusing. Some people have mild strabismus, and see intermittently double. Your eyes and your body should feel better after you sleep. Good night.